(PHP 5 >= 5.5.0, PHP 7, PECL >= 3.0.0a1)
IntlCalendar::getTimeZone — Get the objectʼs timezone
Object oriented style
public IntlCalendar::getTimeZone ( ) : IntlTimeZone
Procedural style
intlcal_get_time_zone ( IntlCalendar $cal ) : IntlTimeZone
Returns the IntlTimeZone object associated with this calendar.
cal
The IntlCalendar resource.
An IntlTimeZone object corresponding to the one used internally in this object.
Example #1 IntlCalendar::getTimeZone()
<?php ini_set('date.timezone', 'Europe/Lisbon'); ini_set('intl.default_locale', 'en_US'); $cal = IntlCalendar::createInstance(); print_r($cal->getTimeZone()); $cal->setTimeZone('UTC'); print_r($cal->getTimeZone()); $cal = IntlCalendar::fromDateTime('2012-01-01 00:00:00 GMT+03:33'); print_r($cal->getTimeZone());
The above example will output:
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/intlcalendar.gettimezone.php