Skip to content

Commit cea3442

Browse files
jesperhagnikic
authored andcommitted
Set timezone for intl/test/bug74298.phpt
Now sets UTC as default timezone for the DateTime which otherwise uses the timezone defined in php.ini.
1 parent e9ff1fa commit cea3442

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/intl/tests/bug74298.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var_dump((new \IntlDateFormatter(
1313
'UTC',
1414
\IntlDateFormatter::GREGORIAN,
1515
'yyyy-MM-dd HH:mm:ss.SSSSSS'
16-
))->format(new \DateTime('2017-01-01 01:02:03.123456')));
16+
))->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC'))));
1717

1818
var_dump(datefmt_create(
1919
'en-US',
@@ -22,7 +22,7 @@ var_dump(datefmt_create(
2222
'UTC',
2323
\IntlDateFormatter::GREGORIAN,
2424
'yyyy-MM-dd HH:mm:ss.SSSSSS'
25-
)->format(new \DateTime('2017-01-01 01:02:03.123456')));
25+
)->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC'))));
2626
?>
2727
--EXPECTF--
2828
string(26) "2017-01-01T01:02:03.123456"

0 commit comments

Comments
 (0)