Hello,
I seem to be having some problems with timestamps on our Wiki.
When on the Unix machine which serves our Wiki, if I run the "date" command, it displays the correct date and time. When I create a sample PHP file to echo the date (echo "The time is : " . date("H:i:sa");) it shows the correct time. When I make an edit in our Wiki, the dates are 4 hours ahead of time. I made an edit at 10:03am and on the recent changes page it says I made that change at 14:03.
I am having a similar problem with my Wordpress blog except the weird thing is that they're not off by the same amount. In fact, the blog has timestamps of 1 hour earlier as opposed to the 4 hours later that the Wiki is saying.
Where could I be having my problem with the Wiki? Does PHP rely on the underlying system's date command or do I need to configure something? Like I said, it seems to be correct when I echo date("H:i:sa") in PHP.
Thanks, ~Eric
Frederich, Eric:
When I make an edit in our Wiki, the dates are 4 hours ahead of time.
I
made an edit at 10:03am and on the recent changes page it says I made that change at 14:03.
Since MediaWiki doesn't know where in the world a particular user is, it will display dates/times in whatever timezone you set in your preferences. Click on "my preferences", then "Date and Time", and check that your personal timezone preference (the offset from UTC) is correct.
Ian
Great, thanks. That was an easy enough answer.
I am unfamiliar with UTC time and whether or not that takes daylight savings time into account.
I live in Florida in the US Eastern Time zone. If I leave it at -5 will it take daylight savings time into account or do I need to do that manually?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Ian Smith Sent: Tuesday, April 03, 2007 10:19 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] timestamps
Frederich, Eric:
When I make an edit in our Wiki, the dates are 4 hours ahead of time.
I
made an edit at 10:03am and on the recent changes page it says I made that change at 14:03.
Since MediaWiki doesn't know where in the world a particular user is, it will display dates/times in whatever timezone you set in your preferences. Click on "my preferences", then "Date and Time", and check that your personal timezone preference (the offset from UTC) is correct.
Ian
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
On 03/04/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
I am unfamiliar with UTC time and whether or not that takes daylight savings time into account.
No.
I live in Florida in the US Eastern Time zone. If I leave it at -5 will it take daylight savings time into account or do I need to do that manually?
You need to set the offset to be correct, i.e. the number of hours your current time differs from UTC. You should be able to just click the button to read the value from the browser.
Rob Church
Thanks Rob.
But if I have to manually change it between -5 and -4 myself whenever daylight savings time kicks in, won't that display wrong information for other days?
For example. A month ago I was UTC - 5 and made edits at 8:00 am. Today I'm at UTC - 4. I'm just guessing here, but if I go and look at those edits from a month ago, won't it say that they were made at 9:00?
~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, April 03, 2007 11:16 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] timestamps
On 03/04/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
I am unfamiliar with UTC time and whether or not that takes daylight savings time into account.
No.
I live in Florida in the US Eastern Time zone. If I leave it at -5
will
it take daylight savings time into account or do I need to do that manually?
You need to set the offset to be correct, i.e. the number of hours your current time differs from UTC. You should be able to just click the button to read the value from the browser.
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
You probably want to set the time to the time your wiki's server is set to. If the server's OS takes care of the daylight saving time and you just want the wiki to read the time from the server put the following in your LocalSettings.php file: ------------------------------ ##Set Default Timezone for East Coast time (EST/EDT): $wgLocaltimezone = "America/New_Tork"; $oldtz = getenv("TZ"); putenv("TZ=$wgLocaltimezone"); $wgLocalTZoffset = date("Z") / 3600; putenv("TZ=$oldtz"); ------------------------------ If your version of Mediawiki is old (1.6 or less), you may need to change the "3600" to "60". For more help: http://meta.wikimedia.org/wiki/Help:Timezone Also, confirm that your account doesn't have a different preference set. You can see your preferences by logging in and hitting the "preferences" link at the top of the page. Any settings there would only effect that account.
-Jim
-----Original Message----- From: Frederich, Eric P21322 [mailto:eric.frederich@siemens.com] Sent: Tuesday, April 03, 2007 11:23 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] timestamps
Thanks Rob.
But if I have to manually change it between -5 and -4 myself whenever daylight savings time kicks in, won't that display wrong information for other days?
For example. A month ago I was UTC - 5 and made edits at 8:00 am. Today I'm at UTC - 4. I'm just guessing here, but if I go and look at those edits from a month ago, won't it say that they were made at 9:00?
~Eric
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Rob Church Sent: Tuesday, April 03, 2007 11:16 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] timestamps
On 03/04/07, Frederich, Eric P21322 eric.frederich@siemens.com wrote:
I am unfamiliar with UTC time and whether or not that takes daylight savings time into account.
No.
I live in Florida in the US Eastern Time zone. If I leave it at -5
will
it take daylight savings time into account or do I need to do that manually?
You need to set the offset to be correct, i.e. the number of hours your current time differs from UTC. You should be able to just click the button to read the value from the browser.
Rob Church
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Frederich, Eric:
Great, thanks. That was an easy enough answer.
You're welcome.
I am unfamiliar with UTC time and whether or not that takes daylight savings time into account.
UTC is (essentially) the same as GMT, and never has daylight savings; it's the basis for all world time. (See http://www.hermit.org/Eclipse/when_time.html for insane detail.)
I live in Florida in the US Eastern Time zone. If I leave it at -5
will
it take daylight savings time into account or do I need to do that manually?
You got me. My server, on Windows, seemed to adjust automatically; but someone else will have to tell us how it knows what your country's daylight savings rules are.
Ian
Do a search on TimeZone in the archives. I just asked this question last week and got much help.
You can get to the archives here http://lists.wikimedia.org/pipermail/mediawiki-l/
Look in March 2007. The subject was local timezone I believe
DSig David Tod Sigafoos | SANMAR Corporation 206-770-5585 davesigafoos@sanmar.com
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Frederich, Eric P21322 Sent: Tuesday, April 03, 2007 7:11 To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] timestamps
Hello,
I seem to be having some problems with timestamps on our Wiki.
When on the Unix machine which serves our Wiki, if I run the "date" command, it displays the correct date and time. When I create a sample PHP file to echo the date (echo "The time is : " . date("H:i:sa");) it shows the correct time. When I make an edit in our Wiki, the dates are 4 hours ahead of time. I made an edit at 10:03am and on the recent changes page it says I made that change at 14:03.
I am having a similar problem with my Wordpress blog except the weird thing is that they're not off by the same amount. In fact, the blog has timestamps of 1 hour earlier as opposed to the 4 hours later that the Wiki is saying.
Where could I be having my problem with the Wiki? Does PHP rely on the underlying system's date command or do I need to configure something? Like I said, it seems to be correct when I echo date("H:i:sa") in PHP.
Thanks, ~Eric
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org