YouTip LogoYouTip

Func Date Timezone Abbreviations List

# timezone_abbreviations_list() --- **timezone_abbreviations_list()** function returns an array containing all timezone abbreviations (DST included). --- ## Definition and Usage The **timezone_abbreviations_list()** function returns an array containing all timezone abbreviations (including DST). ## Syntax ``` array timezone_abbreviations_list ( void ) ``` ## Technical Details | | | |---|---| | Return Value: | Returns an array on success. FALSE on failure. | | PHP Version: | 5.2+ | --- ## More Examples ### Example Return the UTC time and different timezones: ```php $transition) { if (!is_array($transition)) continue; foreach ($transition as $id => $entry) { if ($zone == "utc") continue; if (is_array($entry) && isset($entry['timezone_id'])) { $date = new DateTime(); $date->setTimezone(new DateTimeZone($entry['timezone_id'])); echo "Zone: " . $zone . "
"; echo "Time: " . $date->format('H:i:s') . "

"; } } } ?> ``` **Output:** ``` Zone: china Time: 10:22:26 Zone: universal Time: 02:22:26 ... ``` ### Example Return the timezone abbreviations for the "utc" timezone: ```php <?php $tz = timezone_abbreviations_list(); echo "
";
print_r($tz);
echo "
"; ?> ``` **Output:** ``` Array ( => Array ( => utc => 0 => +00:00 => UTC => ) ) ``` --- ## Related Functions * [timezone_identifiers_list()]( * [timezone_name_from_abbr()]( * [timezone_name_get()]( * [timezone_offset_get()]( * [timezone_transitions_get()]( --- ( [โฎ Previous]( โฏ]( ## Comments ![](
โ† Func Date Timezone IdentifiersFunc Date Time โ†’