Thanks a lot Brian.
My server is in a different timezone than i am, and i had just assumed that MediaWiki was storing timestamps in the server's timezone. When i use UTC everything seems to work fine ...
except ...
I am in EDT so i should be -5 hours from UTC. But in the preferences Time Zone panel it says that i am only 4 hours behind the server even though it is correctly displaying my local time. Is this an error in my localsettings?
Just to make sure i understand what's going on with dates and times...
MediaWiki stores all timestamps in UTC. So gmdate('YmdHis') should be the same as $dbr->timestamp() ? /
a@kid wrote:
I am in EDT so i should be -5 hours from UTC. But in the preferences Time Zone panel it says that i am only 4 hours behind the server even though it is correctly displaying my local time. Is this an error in my localsettings?
It's daylight saving time. :)
Just to make sure i understand what's going on with dates and times...
MediaWiki stores all timestamps in UTC. So gmdate('YmdHis') should be the same as $dbr->timestamp() ?
Yes. The one 'exception' is times embedded into text with signatures (~~~~) which is in the system timezone. You can override that usually by setting the TZ variable or setting $wgLocalTimezone.
You can also change the default local timezone offset, which will be used for the display of times for anonymous visitors and new accounts. (This is the offset that can be changed in Preferences). There should be a FAQ entry on this which links a couple pages with more detail on time options.
-- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org