Changeset 43387 for trunk/tests/phpunit/tests/date/dateI18n.php
- Timestamp:
- 07/03/2018 03:58:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/dateI18n.php
r42343 r43387 68 68 $this->assertEquals( '2012-12-01 00:00:00 CST -06:00 America/Regina', date_i18n( 'Y-m-d H:i:s T P e', strtotime( '2012-12-01 00:00:00' ) ) ); 69 69 } 70 71 /** 72 * @ticket 34835 73 */ 74 public function test_gmt_offset_should_output_correct_timezone() { 75 $timezone_formats = 'P I O T Z e'; 76 $timezone_string = 'America/Regina'; 77 $datetimezone = new DateTimeZone( $timezone_string ); 78 update_option( 'timezone_string', '' ); 79 $offset = $datetimezone->getOffset( new DateTime() ) / 3600; 80 update_option( 'gmt_offset', $offset ); 81 $datetime = new DateTime( 'now', $datetimezone ); 82 $datetime = new DateTime( $datetime->format( 'P' ) ); 83 84 $this->assertEquals( $datetime->format( $timezone_formats ), date_i18n( $timezone_formats ) ); 85 } 70 86 }
Note: See TracChangeset
for help on using the changeset viewer.