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

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 5 15:39:38 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):

 Alternative approach that removes date_default_timezone_set() from
 wp_timezone_override_offset().  UTC is always the default timezone and we
 always do our own offset adding.  This seems to be the only way to have
 date() behave the same way across different versions of PHP and allows
 plugin authors to continue passing current_time() to date() without us
 having to hack current_time() to return the same timestamp whether gmt is
 requested or not or without them having to call date differently depending
 on the PHP version.

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


More information about the wp-trac mailing list