|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-05-02 09:46 UTC] ab@php.net
-Status: Open
+Status: Feedback
[2016-05-02 09:46 UTC] ab@php.net
[2016-05-15 04:22 UTC] pecl-dev at lists dot php dot net
[2016-05-16 11:49 UTC] gjorgjioski at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ When using new IntlDateFormatter sometimes no object is created. On our production server, for the following timezones, IntlDateFormatter cannot be created: Africa/Juba America/Bahia_Banderas America/Creston America/Fort_Nelson America/Kralendijk America/Lower_Princes America/Matamoros America/Metlakatla America/North_Dakota/Beulah America/Ojinaga America/Sitka Antarctica/Macquarie Antarctica/Troll Asia/Barnaul Asia/Chita Asia/Hebron Asia/Khandyga Asia/Novokuznetsk Asia/Srednekolymsk Asia/Ust-Nera Europe/Astrakhan Europe/Busingen Europe/Ulyanovsk Pacific/Bougainville Pacific/Chuuk Pacific/Pohnpei On the other side, this list is a bit different on our development server, and here it is: America/Fort_Nelson Antarctica/Troll Asia/Barnaul Asia/Chita Asia/Khandyga Asia/Srednekolymsk Asia/Ust-Nera Europe/Astrakhan Europe/Busingen Europe/Ulyanovsk Pacific/Bougainville It is the same version of php, 5.6.18. OS is CentOS, on production v 6.7, and on development v 7.0. If you need additional info to debug this situation, please let me know and I will be happy to provide. Test script: --------------- $tz_identifiers = DateTimeZone::listIdentifiers(); foreach ($tz_identifiers as $tz_identifier){ $test = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::SHORT, $tz_identifier ); if (empty($test)){ print($tz_identifier); } } Expected result: ---------------- I expect to see no output from the above script, IntlDateFormatter should be created for every timezone listed. Actual result: -------------- Timezones that IntlDateFormatter can not be created for.