DateTimeZone::getLocation

timezone_location_get

(PHP 5 >= 5.3.0, PHP 7)

DateTimeZone::getLocation -- timezone_location_get锟斤拷锟斤拷锟斤拷时锟斤拷锟斤拷氐亩锟轿伙拷锟较拷锟�

说锟斤拷

锟斤拷锟斤拷锟斤拷锟斤拷锟�

public DateTimeZone::getLocation ( void ) : array

锟斤拷锟教伙拷锟斤拷锟�

timezone_location_get ( DateTimeZone $object ) : array

锟斤拷锟斤拷锟斤拷时锟斤拷锟斤拷氐亩锟轿伙拷锟较拷锟斤拷锟斤拷锟斤拷锟斤拷掖锟斤拷耄筹拷锟�/锟斤拷锟饺和斤拷锟酵★拷

锟斤拷锟斤拷

object

锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟� timezone_open() 锟斤拷锟截碉拷 DateTimeZone 锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟介,锟斤拷锟斤拷锟斤拷时锟斤拷锟斤拷氐亩锟轿伙拷锟较拷锟�

锟斤拷锟斤拷

Example #1 DateTimeZone::getLocation() 锟斤拷锟斤拷锟侥凤拷锟斤拷锟斤拷

<?php
$tz 
= new DateTimeZone("Europe/Prague");
print_r($tz->getLocation());
print_r(timezone_location_get($tz));
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

Array
(
    [country_code] => CZ
    [latitude] => 50.08333
    [longitude] => 14.43333
    [comments] => 
)
Array
(
    [country_code] => CZ
    [latitude] => 50.08333
    [longitude] => 14.43333
    [comments] => 
)