[wp-trac] [WordPress Trac] #9588: time() is not GMT time()

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 4 23:19:27 UTC 2010


#9588: time() is not GMT time()
--------------------------------+-------------------------------------------
  Reporter:  Denis-de-Bernardy  |        Type:  defect (bug)           
    Status:  reopened           |    Priority:  normal                 
 Milestone:  3.0                |   Component:  Date/Time              
   Version:  2.8                |    Severity:  normal                 
Resolution:                     |    Keywords:  has-patch needs-testing
--------------------------------+-------------------------------------------

Comment(by ryan):

 Summary of latest patch:

  * If timezone_string is set, make that the default timezone in wp-
 settings.php
  * If timezone_string is not set, make UTC the default timezone.  This way
 we can add our offsets.
  * If running a version of PHP without timezone support, no default can be
 set.
  * In current_time(), add the offset if timezone_string is not set or if
 the PHP version does not support timezones.
  * If the default timezone is set, do not add offsets since date(),
 gmdate(), etc. do the right thing for us.
  * Add compate_date() to work around the differences between the old
 assumptions and the new.  Only touch_time() uses this at the moment. There
 may be a way to update touch_time() to work correctly either way without
 an ugly workaround.
  * current_time() is used in more places.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9588#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list