(PHP 5 >= 5.2.1, PHP 7)
DateTime::getTimezone -- DateTimeImmutable::getTimezone -- DateTimeInterface::getTimezone -- date_timezone_get — Return time zone relative to given DateTime
���������
���̻����
Return time zone relative to given DateTime.
object
��Ϊ���̻������ date_create() ���ص� DateTime ���͵Ķ���
Returns a DateTimeZone object on success
������ʧ��ʱ���� FALSE
.
Example #1 DateTime::getTimezone() example
���������
<?php
$date = new DateTime(null, new DateTimeZone('Europe/London'));
$tz = $date->getTimezone();
echo $tz->getName();
?>
���̻����
<?php
$date = date_create(null, timezone_open('Europe/London'));
$tz = date_timezone_get($date);
echo timezone_name_get($tz);
?>
�������̻������
Europe/London