Bug #70816 [NEW]: timezone_identifiers_list() missing some timezones

From: Date: Thu, 29 Oct 2015 20:01:31 +0000
Subject: Bug #70816 [NEW]: timezone_identifiers_list() missing some timezones
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196894@lists.php.net to get a copy of this message
From:             asphp at dsgml dot com
Operating system: 
PHP version:      Irrelevant
Package:          Date/time related
Bug Type:         Bug
Bug description:timezone_identifiers_list() missing some timezones

Description:
------------
The timezone_identifiers_list() does not list aliases, even though they
are listed on http://php.net/manual/en/timezones.php and they
work if
you try to create a date with them.

It should include all timezones, even aliases.

Test script:
---------------
<?
new DateTimeZone("Asia/Tel_Aviv"); //works fine
new DateTimeZone("America/Porto_Acre"); //works fine
new DateTimeZone("America/Montreal"); //works fine

var_dump(in_array("Asia/Tel_Aviv", timezone_identifiers_list()));
//false
var_dump(in_array("America/Porto_Acre", timezone_identifiers_list()));
//false
var_dump(in_array("America/Montreal", timezone_identifiers_list()));
//false

//Those are alias to these:
var_dump(in_array("Asia/Jerusalem", timezone_identifiers_list()));
//true
var_dump(in_array("America/Rio_Branco", timezone_identifiers_list()));
//true
var_dump(in_array("America/Toronto", timezone_identifiers_list()));
//true




-- 
Edit bug report at https://bugs.php.net/bug.php?id=70816&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=70816&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=70816&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=70816&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=70816&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=70816&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=70816&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=70816&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=70816&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=70816&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=70816&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=70816&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=70816&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=70816&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70816&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=70816&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=70816&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=70816&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70816&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=70816&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=70816&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#196894) next »