Changeset 54230 for trunk/tests/phpunit/tests/date/mysql2date.php
- Timestamp:
- 09/19/2022 11:51:20 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/date/mysql2date.php
r54217 r54230 64 64 65 65 /** 66 * Ensures that deprecated timezone strings are handled correctly. 67 * 68 * @ticket 56468 69 */ 70 public function test_mysql2date_should_format_time_with_deprecated_time_zone() { 71 $timezone = 'America/Buenos_Aires'; // This timezone was deprecated pre-PHP 5.6. 72 update_option( 'timezone_string', $timezone ); 73 $datetime = new DateTime( 'now', new DateTimeZone( $timezone ) ); 74 $rfc3339 = $datetime->format( DATE_RFC3339 ); 75 $mysql = $datetime->format( 'Y-m-d H:i:s' ); 76 77 $this->assertSame( $rfc3339, mysql2date( DATE_RFC3339, $mysql ) ); 78 $this->assertSame( $rfc3339, mysql2date( DATE_RFC3339, $mysql, false ) ); 79 } 80 81 /** 66 82 * @ticket 28992 67 83 */
Note: See TracChangeset
for help on using the changeset viewer.