Req #70801 [Opn->Wfx]: More concise and clearly labeled time zones

From: Date: Mon, 24 Apr 2017 12:07:09 +0000
Subject: Req #70801 [Opn->Wfx]: More concise and clearly labeled time zones
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208739@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70801&edit=1 ID: 70801 Updated by: heiglandreas@php.net Reported by: scott at connerly dot net Summary: More concise and clearly labeled time zones -Status: Open +Status: Wont fix Type: Feature/Change Request Package: Date/time related Operating System: n/a PHP Version: Irrelevant Block user comment: N Private report: N New Comment: The list you are showing in the screenshot does NOT contain Timezones (at least in the top) but Timezone-Abbreviations. These should NOT be used to assign timezones. A better approach would be to select a city and then use geolocation tools available to determine the correct timezone for that area. In any case that's not something I'd see within the PHP-Core but within a userland library. Previous Comments: ------------------------------------------------------------------------ [2015-10-31 02:40:16] scott at connerly dot net FYI, here's the repo I created to utilize Ruby's timezone list in PHP. https://github.com/scottconnerly/timezone Its far from elegant, but it gets the job done. Its never great to scrape content, but for now, it'll do. ------------------------------------------------------------------------ [2015-10-28 01:26:02] scott at connerly dot net 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#208739) next »