Changeset 51616
- Timestamp:
- 08/15/2021 01:39:47 PM (3 years ago)
- Location:
- branches/4.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.4
-
branches/4.4/tests/phpunit/tests/formatting/date.php
r35284 r51616 82 82 update_option( 'timezone_string', 'Europe/London' ); 83 83 $local = 'now'; 84 $gmt = gmdate( 'Y-m-d H:i:s' , strtotime( 'now' ));85 $this->assertEquals( $gmt, get_gmt_from_date( $local ));84 $gmt = gmdate( 'Y-m-d H:i:s' ); 85 $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); 86 86 } 87 87 … … 91 91 function test_get_gmt_from_date_string_date_no_timezone() { 92 92 $local = 'now'; 93 $gmt = gmdate( 'Y-m-d H:i:s' , strtotime( 'now' ));94 $this->assertEquals( $gmt, get_gmt_from_date( $local ));93 $gmt = gmdate( 'Y-m-d H:i:s' ); 94 $this->assertEquals( strtotime( $gmt ), strtotime( get_gmt_from_date( $local ) ), 'The dates should be equal', 2 ); 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.