DateTimeZone::getLocation

It returns location details of a given timezone
Example

<?php
$timezone_identifiers = timezone_identifiers_list();
for ($i=0; $i < 10; $i++)
echo $timezone_identifiers[$i].”<br />”;

?>
s

Output

Array
(
[country_code] => AU
[latitude] => -31.95
[longitude] => 115.85
[comments] => Western Australia – most locations
)

Share