Req #70801 [Opn]: More concise and clearly labeled time zones
Edit report at https://bugs.php.net/bug.php?id=70801&edit=1
ID: 70801
User updated by: scott at connerly dot net
Reported by: scott at connerly dot net
Summary: More concise and clearly labeled time zones
Status: Open
Type: Feature/Change Request
Package: Date/time related
Operating System: n/a
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
In the case that there is more than one relevant user-friendly name for a time zone identifier, an
array of user-friendly names may be required. Example: Asia/Tokyo could have the friendly names of
Osaka, Sapporo, or Tokyo.
Previous Comments:
------------------------------------------------------------------------
[2015-10-27 15:20:18] scott at connerly dot net
Description:
------------
Currently, DateTimeZone::listIdentifiers() returns all 417 Zones and Links that were ever available
in the tz database. Additionally, the only names supplied by DateTimeZone::getLocation() are the
actual time zone names, not any user-friendly names.
This request to PHP is the companion request to this request to Ruby:
https://github.com/rails/rails/issues/22088
which references this array:
https://github.com/rails/rails/blob/2cecd213702fedce27840a62d07df1359d67f351/activesupport/lib/active_support/values/time_zone.rb#L31
My requests:
- Add a mechanism to get just the primary identifiers, perhaps by a new constant similar to
ALL_WITH_BC, like PRIMARY_ACTIVE. This would return the curated list of 149 rather than all 417.
- Add a mechanism to get the user-friendly name for an identifier. Perhaps this could happen by
adding an array element in DateTimeZone::getLocation()s' results.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70801&edit=1
Thread (5 messages)