[wp-trac] Re: [WordPress Trac] #3962: XML-RPC Incorrectly Handles New Daylight Savings Time

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 13 16:36:13 GMT 2007


#3962: XML-RPC Incorrectly Handles New Daylight Savings Time
------------------------------+---------------------------------------------
 Reporter:  iacas             |        Owner:  anonymous
     Type:  defect            |       Status:  new      
 Priority:  normal            |    Milestone:           
Component:  XML-RPC           |      Version:  2.1.2    
 Severity:  normal            |   Resolution:           
 Keywords:  reporter-feeback  |  
------------------------------+---------------------------------------------
Comment (by Otto42):

 Replying to [comment:6 iacas]:
 > Virtually every server I've seen in the past allows the user to set the
 time zone in which they reside. It's not universal, but it's rather
 common. How about an option to "use server time" or to specify your own
 UTC offset?
 >
 > In PHP, "date()" works reliably if the user can set the time zone.

 That's sort of the problem. We do have the ability for a user to set their
 own offset from UTC, in a number of hours (-6, for example). What we
 *need* is a more standard timezone handling mechanism.

 Generally, you don't set your timezone as a UTC offset. You set it as a
 location. Like America/Chicago, or Europe/Amsterdam or what have you. This
 not only sets your offset, but regional variations as well.

 In PHP4, this was all based off the contents of the TZ environment
 variable.
 In PHP5, they added functions to set it more directly, like
 date_default_timezone_set().

 In either case, date() will reliably give the correct local time for any
 given timezone *if* one of those are set properly. Wordpress is doing
 neither. It's just multiplying the offset by 3600 and adding it to the
 time output wherever it needs a date. All these can be eliminated with
 proper timezone handling.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3962#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list