Author |
Topic |
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 01 November 2004 : 19:36:48
|
I've searched the forum here, and it only seems that there is an older version of the timezone mod. Does anyone have a newer version? |
Erick Snowmobile Fanatics
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 01 November 2004 : 23:49:18
|
None that I know of. |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 02 November 2004 : 00:42:10
|
I guess i've got some work ahead of me then. |
Erick Snowmobile Fanatics
|
|
|
-gary
Development Team Member
406 Posts |
Posted - 09 November 2004 : 11:37:32
|
Not much work at all. Store the offset from your current server time in their profile and then add:
if fDate <> "" and strM_TIMEZONE <> "" then fDate = datetostr(dateadd("h", strM_TIMEZONE, strtodate(fDate)))
to the chkDate function.
If anyone knows a way to get UTC time within ASP without Java, let me know. |
KawiForums.com
|
|
|
PeeWee.Inc
Senior Member
United Kingdom
1893 Posts |
Posted - 09 November 2004 : 11:43:57
|
I think Huw did this, so maybe he'll be the best one to ask. |
De Priofundus Calmo Ad Te Damine |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 09 November 2004 : 11:52:00
|
quote: Originally posted by -gary
Not much work at all. Store the offset from your current server time in their profile and then add:
if fDate <> "" and strM_TIMEZONE <> "" then fDate = datetostr(dateadd("h", strM_TIMEZONE, strtodate(fDate)))
to the chkDate function.
How would that give you the users local time ?
quote:
If anyone knows a way to get UTC time within ASP without Java, let me know.
You have to use javascript, there are no utc functions in vbscript, |
|
|
-gary
Development Team Member
406 Posts |
Posted - 09 November 2004 : 12:05:18
|
quote: Originally posted by HuwRHow would that give you the users local time ?
You're adjusting the display of the date (stored in the servers local time) by whatever offset the users have stored in their profile. |
KawiForums.com
|
Edited by - -gary on 09 November 2004 12:05:36 |
|
|
-gary
Development Team Member
406 Posts |
Posted - 09 November 2004 : 12:20:57
|
I should've mentioned this isn't just an idea but already implemented. kawiforums.com uses this and it works just fine except for DST changes. Hence my need for a UTC function. Right now I leave the server to it's own devices in adjusting the time for the shifts. It's not a problem as long as the user lives in a timezone that observes DST.
I also modded the function to display "Today" in red instead of the date if the date returned is today. Makes seeing new posts much easier. |
KawiForums.com
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 09 November 2004 : 12:33:09
|
quote: Originally posted by -gary
quote: Originally posted by HuwRHow would that give you the users local time ?
You're adjusting the display of the date (stored in the servers local time) by whatever offset the users have stored in their profile.
Ok, I understand now, that is essentially what the timezone mod does, but it stores the offset from GMT as does the server.
You will still have to use javascript. |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 09 November 2004 : 18:12:02
|
Err, what's UTC time? I know how to advance or decrease the time for users I planned on having it where they set what timezone they are in and then finding the difference from that timezone to the one the server is in, and then changing the post time accordingly. I'm not sure what to do about daylight savings time though. |
Erick Snowmobile Fanatics
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 09 November 2004 : 18:44:41
|
UTC = GMT |
|
|
|
Topic |
|