(PHP 5 >= 5.5.0, PHP 7, PHP 8)
IntlTimeZone::createTimeZoneIDEnumeration -- intltz_create_time_zone_id_enumeration — Get an enumeration over system time zone IDs with the given filter conditions
Object-oriented style (method):
$type
, ? string $region
= null
, ? int $rawOffset
= null
): IntlIterator |false Procedural style:
$type
, ? string $region
= null
, ? int $rawOffset
= null
): IntlIterator |false This function is currently not documented; only its argument list is available.
type
region
rawOffset
Returns IntlIterator or false
on failure.
Iterating the return value gives you a a string with the time zone ID (ie "Europe/London" or "Etc/GMT-1")
For the constants to use for the `zoneType` argument, see:
https://github.com/php/php-src/blob/master/ext/intl/timezone/timezone_class.cpp#L419-L421
<?php
IntlTimeZone::TYPE_ANY // the whole lot, including aliases like "CST"
IntlTimeZone::TYPE_CANONICAL // the canonical IDs (no aliases)
IntlTimeZone::TYPE_CANONICAL_LOCATION // only IDs for locations (no "Etc/GMT-1")
?>