Bug #70838 [Com]: DateTimeZone::listIdentifiers() ignores parameter $country

From: Date: Wed, 04 Nov 2015 16:27:10 +0000
Subject: Bug #70838 [Com]: DateTimeZone::listIdentifiers() ignores parameter $country
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197025@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
 Comment by:         serhiy dot shkolyarenko at gmail dot com
 Reported by:        serhiy dot shkolyarenko at gmail dot com
 Summary:            DateTimeZone::listIdentifiers() ignores parameter
                     $country
 Status:             Closed
 Type:               Bug
 Package:            Date/time related
 Operating System:   any
 PHP Version:        5.6.15
 Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

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');


Previous Comments:
------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#197025) next »