com php-src: Set timezone for intl/test/bug74298.phpt: ext/intl/tests/bug74298.phpt

From: Date: Fri, 02 Jun 2017 21:40:48 +0000
Subject: com php-src: Set timezone for intl/test/bug74298.phpt: ext/intl/tests/bug74298.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-97986@lists.php.net to get a copy of this message
Commit: cea34425f37fbef86f92cde05024ff1cbbc927b0 Author: Jesper Hagström <Jesper.hag@gmail.com> Fri, 2 Jun 2017 15:29:04 +0200 Committer: Nikita Popov <nikita.ppv@gmail.com> Fri, 2 Jun 2017 23:40:48 +0200 Parents: e9ff1fac85b97c677e33210770f87f7dc4bc5a24 Branches: PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cea34425f37fbef86f92cde05024ff1cbbc927b0 Log: 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. Bugs: https://bugs.php.net/74298 Changed paths: M ext/intl/tests/bug74298.phpt Diff: diff --git a/ext/intl/tests/bug74298.phpt b/ext/intl/tests/bug74298.phpt index 0600a46..0bfb59b 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"

« previous php.cvs (#97986) next »