WordPress 2.1.2 and Daylight Savings
Posted March 12th, 2007 @ 10:09am by Erik J. Barzeski
My server correctly reports the time via the date
command:
[11:01am root@as:~] # date
Mon Mar 12 11:01:17 EDT 2007
But this morning, a WordPress post I had set to publish at 10am did not publish until 11am. The server is set to "(GMT -05:00) EST/EDT." If I change it to EST only, date
reports an hour ago (10:01).
What's up with that? Is the server to blame, or WordPress?
P.S. I posted this via ecto, and when it reloaded the article after posting it, the time on the article was changed to 10:04 despite me explicitly having set the time to the current time. Re-posting it to add this postscript has reverted the time back to 9:04!
P.P.S. <?=date('Y-m-d H:i:s');?>
returns the correct time. WordPress has a daylight savings bug?
Posted 12 Mar 2007 at 11:06am #
I just posted an article to my blog, and MarsEdit is reporting that I posted it an hour ago. WordPress's "Edit Post" page, too. Am using WordPress 2.1.2 as well, and the server time is correct.
Good catch, I wonder what's causing the problem.
Posted 12 Mar 2007 at 12:15pm #
Filed as Ticket #3962.
Posted 12 Mar 2007 at 12:22pm #
I've always been under the (possible misimpression) that one had to input the UTC offset manually.
(which is an issue unto itself, but this *might* explain things, maybe)
Posted 12 Mar 2007 at 1:49pm #
[quote comment="39978"]I've always been under the impression that one had to input the UTC offset manually.[/quote]
I still consider it a bug. You shouldn't have to enter a time zone or an offset: WordPress should use the server's time zone.
Posted 12 Mar 2007 at 8:02pm #
Oh yeah!! My mistake...since it only happens twice a year, it's kind of easy to forget.
At the very least, I'd be comfortable with setting my time zone in the WP Admin, as my server is located in LA, while I'm on the east coast.
Posted 12 Mar 2007 at 9:44pm #
[quote comment="39979"][quote comment="39978"]I've always been under the impression that one had to input the UTC offset manually.[/quote]
I still consider it a bug. You shouldn't have to enter a time zone or an offset: WordPress should use the server's time zone.[/quote]
I think it was discussed, once upon a time, to use the server's time, but it turned out there was no reliable way to get this *on every single setup.* WordPress by default takes UTC then applies the user's offset change.
Posted 13 Mar 2007 at 6:38pm #
[quote comment="39979"]WordPress should use the server's time zone.[/quote]
I don't think it would be wise to use the server's time zone. The web server may or may not be located in the same time zone as the blogger / site publisher.
Posted 13 Mar 2007 at 7:24pm #
[quote comment="40032"]I don't think it would be wise to use the server's time zone. The web server may or may not be located in the same time zone as the blogger / site publisher.[/quote]
Almost every hosting plan that costs more than Dreamhosts's 25 cents/month plans offers the ability to set the time zone.
But fine, I'll revise what I said. WordPress should have a radio button. The first choice would be "use the server's time." The second choice could be "set UTC offset."
The current setup makes everyone - even people who control the entire box - change their settings twice per year.
Posted 13 Mar 2007 at 7:33pm #
In other news, my Mint installation switched over the time without any intervention required from me. Yes, on a Dreamhost server.
If Mint can do it, why can't WordPress?
Posted 14 May 2009 at 12:33pm #
[...] it be? Yes, after more than two years, it seems [...]
Posted 13 Jun 2009 at 9:11am #
[...] this bug from WordPress 2.1.2 is fixed, eliminating the need for this [...]