[wp-testers] Wordpress UTC Time

Kimmo Suominen kimmo+key+wordpress.c4f53f at suominen.com
Thu Mar 22 08:28:49 GMT 2007


On Thu, Mar 22, 2007 at 02:19:36AM -0400, spencerp wrote:
> Sorry, but I agree with David and Robert Deaton. IMHO, (if it really 
> needs done) just do up a plugin for it and be done with it. LoL! :P

With my Time Zone plugin you can use any time zone on a UNIX server.
I believe that on a Windows server you can only use the time zone
the server is in, i.e. specifying a custom time zone does not work.

If anyone has ideas on how to select time zones on Windows, I'd be
willing to add that to the plugin.  I don't have a Windows server to
test on.  (Maybe I could play with XAMPP on a desktop...)

As was kindly mentioned on this thread earlier, the plugin lives at

    http://kimmo.suominen.com/sw/timezone/

On Wed, Mar 21, 2007 at 11:10:39PM -0700, Matt wrote:
> I think it should be using date(), then just be able to specify the offset
> from the server time. Since most servers should be patched with the changes
> in Daylight Saving(s) Time (:P). Can a plugin deal with the time? And what
> hook or whatever (I haven't exactly made a Wordpress plugin before :P )
> would you use?

Different countries change to and from DST at different times.  For
instance, the USA is already in DST, while Europe switches this weekend
on Sunday.  So if you and your server live on those two areas, for a
couple of weeks every year you'd have to adjust the offset to server
time, which makes for a total of 4 changes per year, as opposed to the 2
changes per year we have now.

The option in WordPress for the time difference is gmt_offset, so the
hook you use is option_gmt_offset.  Just add your filter to modify or
override the value.

Best regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>



More information about the wp-testers mailing list