php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78669 timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb
Submitted: 2019-10-13 23:04 UTC Modified: 2019-10-20 10:41 UTC
From: andy at asjohnson dot com Assigned: cmb (profile)
Status: Closed Package: Date/time related
PHP Version: 7.3.10 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andy at asjohnson dot com
New email:
PHP Version: OS:

 

 [2019-10-13 23:04 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-10-14 07:09 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2019-10-14 07:09 UTC] 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-15 18:50 UTC] derick@php.net
-Status: Suspended +Status: Open -Type: Bug +Type: Documentation Problem
 [2019-10-15 18:50 UTC] derick@php.net
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.
 [2019-10-20 10:41 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=348186
Log: Fix #78669: timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb
 [2019-10-20 10:41 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-10-20 10:41 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2019-10-20 10:45 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=da2c9d494200b6d0e8532a096ddc2adad1031369
Log: Fix #78669: timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb
 [2020-02-07 06:04 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=1ca11e8adb107ebbd79bec090191e52da629a2c2
Log: Fix #78669: timezone_abbreviations_list only lists from compiled in db, not PECL timezonedb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 12:01:31 2024 UTC