Doc #70838 [Asn->Csd]: DateTimeZone::listIdentifiers() ignores parameter $country
| From: | cmb@php.net | Date: | Wed, 09 Dec 2020 17:57:46 +0000 |
| Subject: | Doc #70838 [Asn->Csd]: DateTimeZone::listIdentifiers() ignores parameter $country | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18231@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70838&edit=1
ID: 70838
Updated by: cmb@php.net
Reported by: serhiy dot shkolyarenko at gmail dot com
Summary: DateTimeZone::listIdentifiers() ignores parameter
$country
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Date/time related
Operating System: any
PHP Version: 5.6.15
Assigned To: derick
Block user comment: N
Private report: N
New Comment:
This has already been fixed in 2009[1].
[1] <http://svn.php.net/viewvc?view=revision&revision=282530>
Previous Comments:
------------------------------------------------------------------------
[2015-11-04 16:27:09] serhiy dot shkolyarenko at gmail dot com
I think, updating documentation is enough.
country
A two-letter ISO 3166-1 compatible country code. Applicable when _what_ argument is
DateTimeZone::PER_COUNTRY only.
Example:
//Show all timezones for US.
DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'US');
------------------------------------------------------------------------
[2015-11-03 11:10:05] derick@php.net
If you have a suggestion on how to make this clearer in the docs, feel free to mention it! Or,
perhaps we should raise a warning if you specify two args and not use "PER_COUNTRY"?
------------------------------------------------------------------------
[2015-11-03 09:32:43] serhiy dot shkolyarenko at gmail dot com
Closed, NOT A BUG
DateTimeZone::PER_COUNTRY should be used
------------------------------------------------------------------------
[2015-11-02 16:30:35] serhiy dot shkolyarenko at gmail dot com
Description:
------------
DateTimeZone::listIdentifiers() ignores second parameter.
Attached script shows cities for the whole Europe, but not for Ukraine only.
Checked for PHP versions 5.6.11 and 7.0.0-RC6.
Test script:
---------------
var_dump(DateTimeZone::listIdentifiers(DateTimeZone::EUROPE, 'UA'));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70838&edit=1