DateTime::getTimezone
PHP 5 >= 5.2.1, PHP 7, PHP 8
DateTime::getTimezone - Return time zone relative to given DateTime
Manual
DateTime::getTimezone(
): public DateTimeZone|false
public DateTimeZonefalseDateTimeImmutable::getTimezone
Parameters
- object
Procedural style only: A DateTime object returned by date_create
Return Values
Returns a DateTimeZone object on success or false on failure.