Bug->Doc #78669 [Sus->Opn]: timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb
| From: | derick@php.net | Date: | Tue, 15 Oct 2019 18:50:09 +0000 |
| Subject: | Bug->Doc #78669 [Sus->Opn]: timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17015@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78669&edit=1
ID: 78669
Updated by: derick@php.net
Reported by: andy at asjohnson dot com
Summary: timezone_abbreviations_list only lists from compiled
in db, not PECL timezonedb
-Status: Suspended
+Status: Open
-Type: Bug
+Type: Documentation Problem
Package: Date/time related
Operating System: Linux
PHP Version: 7.3.10
Block user comment: N
Private report: N
New Comment:
I am going to mark this as a documentation issue. This function uses timelib's
timelib_timezone_abbreviations_list which returns a precompiled list of timezone abbreviations for
lookups for fallbacks. It is too computationally expensive to do compile this list at each call per
PHP process (it takes seconds), and hence the list as returned by the PHP function uses this
pre-generated list instead.
I also generally frown upon using abbreviations for any input, as these are often not unique, and/or
ambiguous.
If you must have the latest version, then the best course of action is to use the latest PHP
version, which will have the latest version of both the timelib library, rules, and this precompiled
list.
Previous Comments:
------------------------------------------------------------------------
[2019-10-14 07:09:22] cmb@php.net
That looks like a timelib issue[1], and as such should be reported
upstream[2]. Thanks.
[1] <https://github.com/derickr/timelib/blob/a064bb55e87b008ef5e6bbf77139a815f5a23cd1/parse_date.re#L156>
[2] <https://github.com/derickr/timelib/issues>
------------------------------------------------------------------------
[2019-10-13 23:04:08] andy at asjohnson dot com
Description:
------------
timezone_abbreviations_list() only lists from compiled in db, not PECL timezonedb.
timezone_identifiers_list() works as expected with PECL timezonedb.
Expected result:
----------------
Expected result is timezone_abbreviations_list from PECL timezonedb. Function
timezone_identifiers_list works with PECL timezonedb as expected.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78669&edit=1