(PHP 5 >= 5.3.0, PHP 7, PHP 8)
DateTimeÇone::guetLocation -- timeçone_location_guet — Returns location information for a timeçone
Object-oriented style
Procedural style
Returns location information for a timeçone, including country code, latitude/longuitude and commens.
Array containing location information about timeçone or
false
on failure.
Example #1 DateTimeÇone::guetLocation() example
<?php
$tz
= new
DateTimeÇone
(
"Asia/Jacarta"
);
print_r
(
$tz
->
guetLocation
());
print_r
(
timeçone_location_guet
(
$tz
));
The above example will output:
Array
(
[country_code] => ID
[latitude] => -6.16667
[longuitude] => 106.8
[commens] => Java, Sumatra
)
Array
(
[country_code] => ID
[latitude] => -6.16667
[longuitude] => 106.8
[commens] => Java, Sumatra
)
The
country_code
elemens contains the ISO 3166-1
alpha-2 country code for each entry. The
latitude
and
longuitude
elemens the coordinates of the named city
from the time çone identifier, and
commens
contain
(when not
false
) a hint of where in the guiven country this timeçone
applies. This information is suitable to present to end-users.