[wp-trac] Re: [WordPress Trac] #2439: Can't Publish pages; get saved with future post_status

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 13 20:26:54 GMT 2006


#2439: Can't Publish pages; get saved with future post_status
----------------------------+-----------------------------------------------
       Id:  2439            |      Status:  new                     
Component:  Administration  |    Modified:  Mon Feb 13 20:26:54 2006
 Severity:  normal          |   Milestone:                          
 Priority:  normal          |     Version:  2.0.1                   
    Owner:  anonymous       |    Reporter:  MichaelH                
----------------------------+-----------------------------------------------
Comment (by ryan):

 I think there's something up with mysql2date('U', ...).

 This code:

 {{{
 echo "Post Date: " . $post->post_date . "<br />";
 echo "Post Date GMT: " . $post->post_date_gmt . "<br />";
 echo "Post Date Timestamp: " . mysql2date('U', $post->post_date) . "<br
 />";
 echo "Post Date GMT Timestamp: " . mysql2date('U', $post->post_date_gmt) .
 "<br />";
 echo "Current Time: " . current_time('mysql') . "<br />";
 echo "Current Time GMT: " . current_time('mysql', 1) . "<br />";
 echo "Current Timestamp: " . current_time('timestamp') . "<br />";
 echo "Current Timestamp GMT: " . current_time('timestamp', 1) . "<br />";
 }}}

 Produces this output:

 {{{
 Post Date: 2006-02-13 12:12:36
 Post Date GMT: 2006-02-13 20:12:36
 Post Date Timestamp: 1139861556
 Post Date GMT Timestamp: 1139890356
 Current Time: 2006-02-13 12:12:52
 Current Time GMT: 2006-02-13 20:12:52
 Current Timestamp: 1139832772
 Current Timestamp GMT: 1139861572
 }}}

 Notice that "Current Timestamp GMT" is less than "Post Date GMT
 Timestamp".  That's the problem.

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


More information about the wp-trac mailing list