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

From: Date: Fri, 25 Aug 2017 08:41:16 +0000
Subject: Bug #75119 [Opn]: function timezone_identifiers_list returns Asia/Rangoon but not Asia/Yangon
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210805@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75119&edit=1 ID: 75119 User updated by: michele dot carino84 at gmail dot com Reported by: michele dot carino84 at gmail dot com Summary: function timezone_identifiers_list returns Asia/Rangoon but not Asia/Yangon Status: Open Type: Bug Package: Date/time related Operating System: Any PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Test script should be <?php if (in_array('Asia\Yangon', timezone_identifiers_list())) { echo 'Asia\Yangon returned'; } else { echo 'Asia\Yangon not returned'; } if (in_array('Asia\Rangoon', timezone_identifiers_list())) { echo PHP_EOL . 'Asia\Rangoon returned'; } else { echo PHP_EOL . 'Asia\Rangoon not returned'; } ----------------------- Sorry Previous Comments: ------------------------------------------------------------------------ [2017-08-25 08:36:21] michele dot carino84 at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=75119&edit=1

« previous php.bugs (#210805) next »