[wp-trac] Re: [WordPress Trac] #9285: making sure post_date and post_date_gmt are correct

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 6 00:54:42 GMT 2009


#9285: making sure post_date and post_date_gmt are correct
--------------------------+-------------------------------------------------
 Reporter:  hailin        |       Owner:  anonymous 
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------

Comment(by hailin):

 Joseph Scott encountered another similar case when post is published via
 XML-RPC.
 post_date was set to 2009-03-05 17:00:00, and post_date_gmt was set to
 2009-03-06 03:00:00; and it has UTC-5.  So user was expecting post to be
 published at 2009-03-05 17:00:00 (2009-03-05 22:00:00 GMT), but it won't
 since cron uses post_date_gmt.

 one way to prevent this is to force post_date_gmt = post_date - gmt_offset
 during wp_insert_post

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


More information about the wp-trac mailing list