Make WordPress Core


Ignore:
Timestamp:
01/03/2016 07:48:07 PM (11 years ago)
Author:
nacin
Message:

XML-RPC: Revert [34681] as it broke date handling.

props dossy, hnle, redsweater.
see #35053, #30429 (original ticket).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r35964 r36163  
    13531353
    13541354                if ( ! empty( $dateCreated ) ) {
    1355                         $post_data['post_date'] = iso8601_to_datetime( $dateCreated );
    1356                         $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
     1355                        $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );
     1356                        $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' );
    13571357                }
    13581358
     
    34273427                        // We know this is supposed to be GMT, so we're going to slap that Z on there by force
    34283428                        $dateCreated = rtrim( $content_struct['date_created_gmt']->getIso(), 'Z' ) . 'Z';
    3429                         $comment_date = iso8601_to_datetime( $dateCreated );
    3430                         $comment_date_gmt = get_gmt_from_date( $comment_date );
     3429                        $comment_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     3430                        $comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
    34313431                }
    34323432
     
    50065006
    50075007                if ( !empty( $dateCreated ) ) {
    5008                         $post_date = iso8601_to_datetime( $dateCreated );
    5009                         $post_date_gmt = get_gmt_from_date( $post_date );
     5008                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     5009                        $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
    50105010                } else {
    50115011                        $post_date = '';
     
    53645364
    53655365                if ( !empty( $dateCreated ) ) {
    5366                         $post_date = iso8601_to_datetime( $dateCreated );
    5367                         $post_date_gmt = get_gmt_from_date( $post_date, 'GMT' );
     5366                        $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));
     5367                        $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
    53685368                } else {
    53695369                        $post_date     = $postdata['post_date'];
Note: See TracChangeset for help on using the changeset viewer.