Page 1 of 1

User-defined timezone effecting all times recorded

Posted: Tue Nov 15, 2005 2:32 pm
by phice
Please read http://devnetwork2.net/viewtopic.php?t=112 and answer the last post, in this thread, if at all possible.

I need to know how I should store times, if I should change the time to server time when the user puts in a timezone-specific time. Any other help would be great.

Posted: Tue Nov 15, 2005 2:43 pm
by timvw
I think a server should always run in gmtime and all dates should be stored in gmtime too.

Depending on the users locale (or by asking him) you can lookup the offset and calculate the gmtime.
I've experienced that it can easily become a mess if store usertimes if those users are in different timezones.

Posted: Tue Nov 15, 2005 3:25 pm
by Buddha443556
I think a server should always run in gmtime and all dates should be stored in gmtime too.
I agree.

I use a seperate wrapper function for time() to fix those servers that are running slow or fast or not on GMT.