[wp-trac] Re: [WordPress Trac] #8662: current_time('timestamp') doesn't return the correct timestamp value

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 28 22:03:27 GMT 2009


#8662: current_time('timestamp') doesn't return the correct timestamp value
--------------------------+-------------------------------------------------
 Reporter:  hudatoriq     |       Owner:  hudatoriq              
     Type:  defect (bug)  |      Status:  new                    
 Priority:  high          |   Milestone:  2.9                    
Component:  Date/Time     |     Version:  2.7                    
 Severity:  major         |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------

Comment(by ryan):

 Unpatched WP trunk running php5 with tz support:

 {{{
 Blog Offset: -5
 Default TZ: America/Chicago
 time() : 1240956111
 current_time('mysql'): 2009-04-28 17:01:51
 current_time('mysql', true): 2009-04-28 22:01:51
 current_time('timestamp'): 1240938111
 date('M d Y H:i:s', current_time('timestamp')): Apr 28 2009 12:01:51
 gmdate('M d Y H:i:s', current_time('timestamp')): Apr 28 2009 17:01:51
 current_time('timestamp', true): 1240956111
 date('M d Y H:i:s', current_time('timestamp', true)): Apr 28 2009 17:01:51
 gmdate('M d Y H:i:s', current_time('timestamp', true)): Apr 28 2009
 22:01:51
 }}}

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


More information about the wp-trac mailing list