[wp-hackers] Timezones, server settings, and WP dates

Stephen Minutillo steveminutillo at gmail.com
Thu Jan 27 17:20:07 GMT 2005


On Thu, 27 Jan 2005 17:44:46 +0100, Frank Schaap <architext at fragment.nl> wrote:
> I wouldn't mind support for DST :) It could even be implemented as simple as
> asking the user for two dates on which to start and stop the extra offset of
> DST... although, thinking about how it's done in the Netherlands you'd have
> to support something like "every 3rd Saturday in April".

The way it "should" work is that on installation of WP, the user pulls
down a menu and says what time zone to display dates in.  Then the
appropriate offset from GMT, as well as seasonal DST or Summer Time
adjustments are done automatically.  Requiring the user to log in and
modify the time setting twice a year is completely insane, but
understandable.  Asking them to enter DST start/end dates is slightly
better, but still nuts.

The problem is from what I know about PHP, time zone support is a
minefield.  I've never found a solution that works across Unix and
Windows, for example.  Most of the code I've seen talks about setting
a TZ= environment variable and usually has a footnote saying that on
Windows, you're out of luck.  I wonder how other PHP applications
handle this?  Maybe some other open source project has nailed this
that there's a library that "just works (TM)".

One of these days^H^H^H^H months^H^H^H^H^H years I'll probably get
around to adding real time and time zone support to Feed on Feeds.  At
that point I'll do some more thorough research into this and if there
isn't a cross platform solution already, build one.


Steve Minutillo


More information about the hackers mailing list