From: Jesper Hagström Date: Fri, 2 Jun 2017 13:29:04 +0000 (+0200) Subject: Set timezone for intl/test/bug74298.phpt X-Git-Tag: php-7.2.0alpha1~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cea34425f37fbef86f92cde05024ff1cbbc927b0;p=php 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. --- diff --git a/ext/intl/tests/bug74298.phpt b/ext/intl/tests/bug74298.phpt index 0600a46b9c..0bfb59b48e 100644 --- a/ext/intl/tests/bug74298.phpt +++ b/ext/intl/tests/bug74298.phpt @@ -13,7 +13,7 @@ var_dump((new \IntlDateFormatter( 'UTC', \IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd HH:mm:ss.SSSSSS' -))->format(new \DateTime('2017-01-01 01:02:03.123456'))); +))->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC')))); var_dump(datefmt_create( 'en-US', @@ -22,7 +22,7 @@ var_dump(datefmt_create( 'UTC', \IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd HH:mm:ss.SSSSSS' -)->format(new \DateTime('2017-01-01 01:02:03.123456'))); +)->format(new \DateTime('2017-01-01 01:02:03.123456', new \DateTimeZone('UTC')))); ?> --EXPECTF-- string(26) "2017-01-01T01:02:03.123456"