[wp-hackers] Timezones, server settings, and WP dates
Eric A. Meyer
eric at meyerweb.com
Thu Jan 27 18:07:11 GMT 2005
At 9:46 -0800 1/27/05, Morgan Doocy wrote:
>Eric, I seem to remember reading that your version of WP is 'hacked
>to pieces'. Did this happen before you altered your install? And
>have you tried testing a fresh WP install to see if it exhibits the
>same behavior?
I hacked it on a server that was set to my time zone, and later
migrated the files to the UTC-configured server when I switched
providers. Everything worked fine on the America/Eastern server,
because the 'T' was returning the server's time zone, and that was
the time zone I wanted. (I hadn't thought ahead to travelling
overseas at that point.)
I haven't tried a fresh install on the new UTC server.
>On the UI side it should add little more than an "Adjust for
>daylight savings time" checkbox and a dropdown for your time
>zone/locale.
Yeah, that's about what I'd expect. Although I've discovered
there are about a billion TZ designators, so a dropdown might not be
in itself sufficient. Picking a continent, then a country, then a
timezone would be less of a hassle for the user. It could mean
having to deal with TZ data, which is enormous and complex.
On the other hand, in my shell account, I have in my .bash_profile:
export TZ=EST5EDT
...and that shows me Eastern times on the UTC-configured server; when
I supply dates this past summer to 'date' it returns EDT designators,
so it seems to handle DST changes with no problem. Might there be a
way to effectively say to UNIX from PHP, "Hey, what's the time if I
claim 'EST5EDT'?" and then use what comes back? (Adjusting the TZ
designator as necessary, of course.) That would mean it was only
necessary to pick the appropriate TZ designator, and not have to
implement time-shift handling in WP.
--
Eric A. Meyer (eric at meyerweb.com)
Principal, Complex Spiral Consulting http://complexspiral.com/
"CSS: The Definitive Guide," "CSS2.0 Programmer's Reference,"
"Eric Meyer on CSS," and more http://meyerweb.com/eric/books/
More information about the hackers
mailing list