How to get the location information for a timezone in PHP

1 Answer

0 votes
$dtz = new DateTimeZone("Europe/London");
echo "<pre>";
print_r($dtz->getLocation());
print_r(timezone_location_get($dtz));
echo "</pre>";

 
/*
run:
     
Array
(
    [country_code] => GB
    [latitude] => 51.50833
    [longitude] => -0.12528
    [comments] => 
)
Array
(
    [country_code] => GB
    [latitude] => 51.50833
    [longitude] => -0.12528
    [comments] => 
)
    
*/

 



answered Jul 21, 2016 by avibootz

Related questions

1 answer 135 views
2 answers 292 views
3 answers 230 views
1 answer 203 views
2 answers 241 views
...