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

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 18 09:56:40 GMT 2008


#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.1                 
Component:  General       |     Version:  2.7                   
 Severity:  major         |    Keywords:  current time timestamp
--------------------------+-------------------------------------------------
 If we pass 'timestamp' parameter into function
 [http://trac.wordpress.org/browser/tags/2.7/wp-includes/functions.php#L91
 current_time()] we get the current time in server timezone. Should be in
 the blog timezone or in GMT (if the $gmt value is true).

 We should use the gmdate() function instead of time(), like the function
 does when receiving 'mysql' parameter.

 I'm gonna attach a patch for this in a moment.

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


More information about the wp-trac mailing list