Make WordPress Core


Ignore:
Timestamp:
01/03/2016 07:49:34 PM (9 years ago)
Author:
nacin
Message:

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

Merges [36163] to the 4.4 branch.

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

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/tests/phpunit/tests/xmlrpc/wp/newPost.php

    r35242 r36164  
    374374    }
    375375
    376     /**
    377      * @ticket 30429
    378      */
    379     function test_post_date_timezone_conversion() {
    380         $tz = get_option( 'timezone_string' );
    381         update_option( 'timezone_string', 'America/New_York' );
    382 
    383         $this->make_user_by_role( 'author' );
    384         $date_string = '1984-01-11 05:00:00';
    385         $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string );
    386         $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) );
    387         $fetched_post = get_post( $result );
    388 
    389         update_option( 'timezone_string', $tz );
    390 
    391         $this->assertStringMatchesFormat( '%d', $result );
    392         $this->assertEquals( $date_string , $fetched_post->post_date );
    393     }
    394376}
Note: See TracChangeset for help on using the changeset viewer.