WordPress 4.4.1
[autoinstalls/wordpress.git] / wp-includes / class-wp-xmlrpc-server.php
index 08897dc032f12ab4ecca726f38647beea0c412bf..5be4dc9b45a42dd60acb13a959d340d4b3be5abf 100644 (file)
@@ -1349,8 +1349,8 @@ class wp_xmlrpc_server extends IXR_Server {
                }
 
                if ( ! empty( $dateCreated ) ) {
                }
 
                if ( ! empty( $dateCreated ) ) {
-                       $post_data['post_date'] = iso8601_to_datetime( $dateCreated );
-                       $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
+                       $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );
+                       $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' );
                }
 
                if ( ! isset( $post_data['ID'] ) )
                }
 
                if ( ! isset( $post_data['ID'] ) )
@@ -3423,8 +3423,8 @@ class wp_xmlrpc_server extends IXR_Server {
                if ( !empty( $content_struct['date_created_gmt'] ) ) {
                        // We know this is supposed to be GMT, so we're going to slap that Z on there by force
                        $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
                if ( !empty( $content_struct['date_created_gmt'] ) ) {
                        // We know this is supposed to be GMT, so we're going to slap that Z on there by force
                        $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
-                       $comment_date = iso8601_to_datetime( $dateCreated );
-                       $comment_date_gmt = get_gmt_from_date( $comment_date );
+                       $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
+                       $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
                }
 
                if ( isset($content_struct['content']) )
                }
 
                if ( isset($content_struct['content']) )
@@ -4991,8 +4991,8 @@ class wp_xmlrpc_server extends IXR_Server {
                        $dateCreated = $content_struct['dateCreated']->getIso();
 
                if ( !empty( $dateCreated ) ) {
                        $dateCreated = $content_struct['dateCreated']->getIso();
 
                if ( !empty( $dateCreated ) ) {
-                       $post_date = iso8601_to_datetime( $dateCreated );
-                       $post_date_gmt = get_gmt_from_date( $post_date );
+                       $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
+                       $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
                } else {
                        $post_date = '';
                        $post_date_gmt = '';
                } else {
                        $post_date = '';
                        $post_date_gmt = '';
@@ -5345,8 +5345,8 @@ class wp_xmlrpc_server extends IXR_Server {
                        $dateCreated = $content_struct['dateCreated']->getIso();
 
                if ( !empty( $dateCreated ) ) {
                        $dateCreated = $content_struct['dateCreated']->getIso();
 
                if ( !empty( $dateCreated ) ) {
-                       $post_date = iso8601_to_datetime( $dateCreated );
-                       $post_date_gmt = get_gmt_from_date( $post_date, 'GMT' );
+                       $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
+                       $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
                } else {
                        $post_date     = $postdata['post_date'];
                        $post_date_gmt = $postdata['post_date_gmt'];
                } else {
                        $post_date     = $postdata['post_date'];
                        $post_date_gmt = $postdata['post_date_gmt'];