Ticket #38815: 38815.patch
| File 38815.patch, 1017 bytes (added by , 9 years ago) |
|---|
-
tests/phpunit/tests/formatting/date.php
80 80 */ 81 81 function test_get_gmt_from_date_string_date() { 82 82 update_option( 'timezone_string', 'Europe/London' ); 83 $local = 'now'; 84 $gmt = gmdate( 'Y-m-d H:i:s', strtotime( 'now' ) ); 85 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 83 $this->assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( get_gmt_from_date( 'now' ) ), 'The dates should be equal', 2 ); 86 84 } 87 85 88 86 /** 89 87 * @ticket 34279 90 88 */ 91 89 function test_get_gmt_from_date_string_date_no_timezone() { 92 $local = 'now'; 93 $gmt = gmdate( 'Y-m-d H:i:s', strtotime( 'now' ) ); 94 $this->assertEquals( $gmt, get_gmt_from_date( $local ) ); 90 $this->assertEquals( strtotime( gmdate( 'Y-m-d H:i:s' ) ), strtotime( get_gmt_from_date( 'now' ) ), 'The dates should be equal', 2 ); 95 91 } 96 92 }