[wp-hackers] Automatic DST (Time Zone plugin for WordPress)
Kimmo Suominen
kim at tac.nyc.ny.us
Mon Feb 14 00:00:38 GMT 2005
Hi!
Inspired by the new hooks for individual options, I finally put together
a real plugin for WordPress. It overrides the gmt_offset option with
information retrieved from the operating system. This should provide
automatic DST switching on any platform where strftime knows about.
http://kimmo.suominen.com/2005/02/13/timezone/
The plugin also allows setting TZ to a user-specified value. You will
need to know the appropriate value for the server operating system. You
can verify the effects of the value from the option page provided by the
plugin. On modern UNIX-like systems the TZ values are usually named
after cities for the surrounding areas.
Here are some examples to try:
America/New_York
America/Indianapolis
America/Chicago
America/Denver
America/Los_Angeles
America/Anchorage
Pacific/Honolulu
Europe/London
Europe/Paris
Europe/Helsinki
US/Eastern
US/East-Indiana
US/Central
US/Mountain
US/Pacific
US/Alaska
US/Hawaii
Note that TZ values are often different from the "time zone name" used
by a given TZ value. E.g. the TZ value America/New_York uses EST (and
EDT) for the time zone name.
If you have a UNIX shell account, read the tzset(3) and environ(7)
manual pages to find out what should work on your server.
Regards,
+ Kim
--
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>
More information about the hackers
mailing list