| | 386 | /** |
| | 387 | * @ticket 30429 |
| | 388 | */ |
| | 389 | function test_post_date_timezone_conversion() { |
| | 390 | update_option( 'timezone_string', 'America/New_York' ); //any non GMT |
| | 391 | $this->make_user_by_role( 'author' ); |
| | 392 | $date_string = '1984-01-11 05:00:00'; |
| | 393 | $post = array( 'post_title' => 'test', 'post_content' => 'test', 'post_date' => $date_string ); |
| | 394 | $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', $post ) ); |
| | 395 | $fetched_post = get_post( $result ); |
| | 396 | $this->assertStringMatchesFormat( '%d', $result ); |
| | 397 | $this->assertEquals( $date_string , $fetched_post->post_date ); |
| | 398 | } |
| | 399 | |