diff --git a/wp-includes/post-functions.php b/wp-includes/post-functions.php index 10e6be4e21..4d012f6de0 100644 --- a/wp-includes/post-functions.php +++ b/wp-includes/post-functions.php @@ -3012,7 +3012,11 @@ function wp_insert_post( $postarr, $wp_error = false ) { * is not 'draft' or 'pending', set date to now. */ if ( empty( $postarr['post_date'] ) || '0000-00-00 00:00:00' == $postarr['post_date'] ) { - $post_date = current_time( 'mysql' ); + if ( empty( $postarr['post_date_gmt'] ) || '0000-00-00 00:00:00' == $postarr['post_date_gmt'] ) { + $post_date = current_time( 'mysql' ); + } else { + $post_date = get_date_from_gmt( $postarr['post_date_gmt'] ); + } } else { $post_date = $postarr['post_date']; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 59cc9afcc3..41fed00809 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34761'; +$wp_version = '4.4-alpha-34762'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.