PHP - Funktion timezone_identifiers_list()
Beispiel
Drucken Sie alle Zeitzonen in Afrika:
<?php
print_r(timezone_identifiers_list(1));
?>
Definition und Verwendung
timezone_identifiers_list() gibt ein indiziertes Array zurück, das alle Zeitzonenkennungen enthält.
Syntax
timezone_identifiers_list(what, country)
Parameterwerte
Parameter | Description |
---|---|
what | Optional. Specifies a DateTimeZone class constant 1 = AFRICA 2 = AMERICA 4 = ANTARCTICA 8 = ARCTIC 16 = ASIA 32 = ATLANTIC 64 = AUSTRALIA 128 = EUROPE 256 = INDIAN 512 = PACIFIC 1024 = UTC 2047 = ALL 4095 = ALL_WITH_BC 4096 = PER_COUNTRY |
country | Optional. Specifies a two-letter ISO 3166-1 compatible country code |
Technische Details
Rückgabewert: | Gibt bei Erfolg ein indiziertes Array zurück. FALSE bei Fehler |
---|---|
PHP-Version: | 5.2+ |
PHP-Änderungsprotokoll: | PHP 5.3: Die optionalen What- und Country- Parameter wurden hinzugefügt |
❮ PHP-Datums-/Zeitreferenz