Changeset 52587
- Timestamp:
- 01/17/2022 01:47:45 PM (3 years ago)
- Location:
- branches/5.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.1
-
branches/5.1/tests/phpunit/tests/date/currentTime.php
r43594 r52587 15 15 16 16 date_default_timezone_set( $timezone_string ); 17 $this->assertEquals( gmdate( $format ), current_time( $format, true ) ); 18 $this->assertEquals( $datetime->format( $format ), current_time( $format ) ); 17 18 $current_time_custom_timezone_gmt = current_time( $format, true ); 19 $current_time_custom_timezone = current_time( $format ); 19 20 20 21 date_default_timezone_set( 'UTC' ); 21 $this->assertEquals( gmdate( $format ), current_time( $format, true ) ); 22 $this->assertEquals( $datetime->format( $format ), current_time( $format ) ); 22 23 $current_time_gmt = current_time( $format, true ); 24 $current_time = current_time( $format ); 25 26 $this->assertEquals( strtotime( gmdate( $format ) ), strtotime( $current_time_custom_timezone_gmt ), 'The dates should be equal', 2 ); 27 $this->assertEquals( strtotime( $datetime->format( $format ) ), strtotime( $current_time_custom_timezone ), 'The dates should be equal', 2 ); 28 $this->assertEquals( strtotime( gmdate( $format ) ), strtotime( $current_time_gmt ), 'The dates should be equal', 2 ); 29 $this->assertEquals( strtotime( $datetime->format( $format ) ), strtotime( $current_time ), 'The dates should be equal', 2 ); 23 30 } 24 31 }
Note: See TracChangeset
for help on using the changeset viewer.