[wp-trac] [WordPress Trac] #9162: wp-mail.php is posting with a future timestamp

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 18 05:57:43 GMT 2009


#9162: wp-mail.php is posting with a future timestamp
--------------------------+-------------------------------------------------
 Reporter:  lincolnadams  |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.8      
Component:  General       |     Version:  2.7      
 Severity:  major         |    Keywords:  wp-mail  
--------------------------+-------------------------------------------------
 WP-Mail is posting timestamp several hours into the future depending on
 one's time zone.  The problem seems to be due to a line 130 of wp-
 mail.php:

 $post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);

 The problem is those who have negative GMT time zones will see their
 postings made at future times instead of the correct times.  Those who
 have postives GMT zones are probably not affected.

 A temporary workaround is to modify $ddate_U + $time_difference); so that
 it subtracts instead of adds:  $post_date = gmdate('Y-m-d H:i:s', $ddate_U
 - $time_difference);

 However, a more permanent fix is needed.

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


More information about the wp-trac mailing list