diff --git src/wp-includes/post.php src/wp-includes/post.php
index 15422a5f32..c555b4b905 100644
|
|
function wp_insert_post( $postarr, $wp_error = false ) { |
3733 | 3733 | $post_status = 'future'; |
3734 | 3734 | } |
3735 | 3735 | } elseif ( 'future' === $post_status ) { |
| 3736 | /* |
| 3737 | * Both `post_date` and `post_date_gmt` should be set at the top of the set hour with the second being ':00' for scheduled |
| 3738 | * 'future' post. |
| 3739 | */ |
| 3740 | $post_date_gmt_time = strtotime( $post_date_gmt ); |
| 3741 | $post_date_time = strtotime( $post_date ); |
| 3742 | |
| 3743 | if ( $post_date_gmt_time && $post_date_time ) { |
| 3744 | $post_date_gmt_date = date( 'Y-m-d H:i:00', $post_date_gmt_time ); |
| 3745 | $post_date_date = date( 'Y-m-d H:i:00', $post_date_time ); |
| 3746 | |
| 3747 | if ( $post_date_gmt_date && $post_date_date ) { |
| 3748 | $post_date = $post_date_date; |
| 3749 | $post_date_gmt = $post_date_gmt_date; |
| 3750 | $postarr['post_date'] = $post_date; |
| 3751 | $postarr['post_date_gmt'] = $post_modified_gmt; |
| 3752 | } |
| 3753 | } |
| 3754 | |
3736 | 3755 | if ( $post_date_gmt <= gmdate( 'Y-m-d H:i:59' ) ) { |
3737 | 3756 | $post_status = 'publish'; |
3738 | 3757 | } |