Make WordPress Core


Ignore:
Timestamp:
01/03/2016 07:48:07 PM (9 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/tests/phpunit/tests/xmlrpc/mw/editPost.php

    r35242 r36163  
    221221
    222222    /**
    223      * @ticket 30429
    224      */
    225     function test_post_date_timezone_conversion() {
    226         $tz = get_option( 'timezone_string' );
    227         update_option( 'timezone_string', 'America/New_York' );
    228 
    229         $editor_id = $this->make_user_by_role( 'editor' );
    230 
    231         $post_id = self::factory()->post->create( array(
    232             'post_author' => $editor_id
    233         ) );
    234 
    235         $date_string = '1984-01-11 05:00:00';
    236         $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'editor', 'editor', array(
    237             'dateCreated' => new IXR_Date( mysql2date( 'Ymd\TH:i:s', $date_string, false ) ),
    238         ) ) );
    239 
    240         $fetched_post = get_post( $post_id );
    241 
    242         update_option( 'timezone_string', $tz );
    243 
    244         $this->assertTrue( $result );
    245         $this->assertEquals( $date_string, $fetched_post->post_date );
    246     }
    247 
    248     /**
    249223     * @ticket 16980
    250224     */
Note: See TracChangeset for help on using the changeset viewer.