Changeset 3525

Show
Ignore:
Timestamp:
02/14/06 00:12:09 (3 years ago)
Author:
ryan
Message:

Fix timestamps for future posts. fixes #2439

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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);