Bug #75119 [NEW]: function timezone_identifiers_list returns Asia/Rangoon but not Asia/Yangon

From: Date: Fri, 25 Aug 2017 08:36:24 +0000
Subject: Bug #75119 [NEW]: function timezone_identifiers_list returns Asia/Rangoon but not Asia/Yangon
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210804@lists.php.net to get a copy of this message
From:             michele dot carino84 at gmail dot com
Operating system: Any
PHP version:      Irrelevant
Package:          Date/time related
Bug Type:         Bug
Bug description:function timezone_identifiers_list returns Asia/Rangoon but not Asia/Yangon

Description:
------------
According to IANA Asia/Rangoon is only a link for Asia/Yangon.
The function timezone_identifiers_list returns only Asia/Rangoon.

The documentation of the function does not specifies that it's going to
return only some of the available ids so the user expectation is to have
at least main ids, instead of secondary linked ones.

A documentation change would make easy to understand what the function
returns.
And also all of the primary ids should be returned.

Test script:
---------------
<?php

if (!in_array('Asia\Yangon', timezone_identifiers_list())) {
    echo 'Asia\Yangon not returned';
}

if (!in_array('Asia\Rangoon', timezone_identifiers_list())) {
    echo PHP_EOL . 'Asia\Rangoon returned';
}



Expected result:
----------------
# if the intent of the function is to return only IANA primary ids

Asia\Yangon returned
Asia\Rangoon not returned 

# else if the intent of the function is to return all of the ids


Asia\Yangon returned
Asia\Rangoon returned 


Actual result:
--------------
Asia\Yangon not returned
Asia\Rangoon returned 

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



Thread (4 messages)

« previous php.bugs (#210804) next »