[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:08:09 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 Otto42):

 Bingo!


 {{{
 date('M d Y H:i:s', current_time('timestamp')): Apr 28 2009 12:01:51
 date('M d Y H:i:s', current_time('timestamp')): Apr 28 2009 10:04:12

 date('M d Y H:i:s', current_time('timestamp', true)): Apr 28 2009 17:01:51
 date('M d Y H:i:s', current_time('timestamp', true)): Apr 28 2009 15:04:12
 }}}


 There's your two hour difference. date takes the current time zone into
 account, and the current time zone is different between the two.

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


More information about the wp-trac mailing list