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

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 5 02:09:07 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.7.2                 
Component:  General       |     Version:  2.7                   
 Severity:  major         |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by DD32):

 > Well, the according docblock does not state that 'timestamp' should
 return the current time 'in GMT', it must return the current timestamp. I
 can not see GMT anywhere there.

 Well, Looking at the source for timestamp, Its specifically adding the GMT
 offset of the blog, So the result should be the current timestamp in that
 timezone.

 If the servers Timezone is set to anything other than GMT, then the
 function as it is, will return a inaccurate result.

 Ok, and Hakre, Didnt notice the $gmt variable i guess? No need for a
 tiemstampgmt, as the 2 options currently are supposed to be:
 timestamp+gmt=false(in blog timezone), or timestamp+gmt=true(in gmt
 timezone)

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


More information about the wp-trac mailing list