note 118767 added to datetimezone.listidentifiers
| From: | kalle at example dot com | Date: | Tue, 02 Feb 2016 09:36:54 +0000 |
| Subject: | note 118767 added to datetimezone.listidentifiers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204833@lists.php.net to get a copy of this message | ||
Even though the manual currently says that the first parameter has to be "One of DateTimeZone
class constants", you may actually combine these constants:
<?php
$a = DateTimeZone::listIdentifiers(DateTimeZone::AFRICA); //gives africa time zones
$b = DateTimeZone::listIdentifiers(DateTimeZone::AMERICA); //gives american time zones
$c = DateTimeZone::listIdentifiers(DateTimeZone::AFRICA | DateTimeZone::AMERICA); //gives both
african and american time zones
?>
Be sure to use |, not ||.
----
Server IP: 72.52.91.14
Probable Submitter: 131.246.163.123
----
Manual Page -- http://php.net/manual/en/datetimezone.listidentifiers.php
Edit -- https://master.php.net/note/edit/118767
Del: integrated -- https://master.php.net/note/delete/118767/integrated
Del: useless -- https://master.php.net/note/delete/118767/useless
Del: bad code -- https://master.php.net/note/delete/118767/bad+code
Del: spam -- https://master.php.net/note/delete/118767/spam
Del: non-english -- https://master.php.net/note/delete/118767/non-english
Del: in docs -- https://master.php.net/note/delete/118767/in+docs
Del: other reasons-- https://master.php.net/note/delete/118767
Reject -- https://master.php.net/note/reject/118767
Search -- https://master.php.net/manage/user-notes.php