Ticket #2439 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 3 years ago

Can't Publish pages; get saved with future post_status

Reported by: MichaelH Assigned to: anonymous
Priority: normal Milestone: 2.1
Component: Administration Version: 2.0.1
Severity: normal Keywords:
Cc:

Description

Using 2.0.1-alpha1 (revision 3523) and any page I try to Publish gets marked with a post_status of 'future'.

I can save a page as either private or draft status and then change them to any post_status but 'publish'. I can change a 'future' post to any other status but publish.

Change History

02/13/06 20:26:54 changed 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.

02/14/06 00:12:12 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [3525]) Fix timestamps for future posts. fixes #2439

02/14/06 00:12:34 changed by ryan

  • milestone set to 2.1.