Make WordPress Core

Ticket #30429: 30429.3.patch

File 30429.3.patch, 2.1 KB (added by smerriman, 10 years ago)

Sorry, attached the wrong file.

  • wp-includes/class-wp-xmlrpc-server.php

     
    13161316                }
    13171317
    13181318                if ( ! empty( $dateCreated ) ) {
    1319                         $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );
    1320                         $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' );
     1319                        $post_data['post_date'] = iso8601_to_datetime( $dateCreated );
     1320                        $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
    13211321                }
    13221322
    13231323                if ( ! isset( $post_data['ID'] ) )
     
    33633363                if ( !empty( $content_struct['date_created_gmt'] ) ) {
    33643364                        // We know this is supposed to be GMT, so we're going to slap that Z on there by force
    33653365                        $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
    3366                         $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
    3367                         $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
     3366                        $comment_date = iso8601_to_datetime( $dateCreated );
     3367                        $comment_date_gmt = get_gmt_from_date( $comment_date );
    33683368                }
    33693369
    33703370                if ( isset($content_struct['content']) )
     
    49054905                        $dateCreated = $content_struct['dateCreated']->getIso();
    49064906
    49074907                if ( !empty( $dateCreated ) ) {
    4908                         $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
    4909                         $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
     4908                        $post_date = iso8601_to_datetime( $dateCreated );
     4909                        $post_date_gmt = get_gmt_from_date( $post_date );
    49104910                } else {
    49114911                        $post_date = current_time('mysql');
    49124912                        $post_date_gmt = current_time('mysql', 1);
     
    52605260                        $dateCreated = $content_struct['dateCreated']->getIso();
    52615261
    52625262                if ( !empty( $dateCreated ) ) {
    5263                         $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
    5264                         $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
     5263                        $post_date = iso8601_to_datetime( $dateCreated );
     5264                        $post_date_gmt = get_gmt_from_date( $post_date, 'GMT' );
    52655265                } else {
    52665266                        $post_date     = $postdata['post_date'];
    52675267                        $post_date_gmt = $postdata['post_date_gmt'];