WordPress.org

Make WordPress Core

Changeset 3525


Ignore:
Timestamp:
02/14/2006 12:12:09 AM (14 years ago)
Author:
ryan
Message:

Fix timestamps for future posts. fixes #2439

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-post.php

    r3517 r3525  
    7373    }
    7474
    75     if ( 'publish' == $post_status && (mysql2date('U', $post_date_gmt) > time()) )
    76         $post_status = 'future';
     75    if ( 'publish' == $post_status ) {
     76        $now = gmdate('Y-m-d H:i:59');
     77        if ( mysql2date('U', $post_date_gmt) > mysql2date('U', $now) )
     78            $post_status = 'future';
     79    }
    7780
    7881    if ( empty($comment_status) ) {
     
    209212
    210213    if ( 'future' == $post_status )
    211         wp_schedule_event(mysql2date('U', $post_date_gmt), 'once', 'publish_future_post', $post_ID);
     214        wp_schedule_event(mysql2date('U', $post_date), 'once', 'publish_future_post', $post_ID);
    212215
    213216    do_action('save_post', $post_ID);
Note: See TracChangeset for help on using the changeset viewer.