DateTime::getTimezone

PHP 5 >= 5.2.1, PHP 7, PHP 8
DateTime::getTimezone - Return time zone relative to given DateTime
Manual
Code Examples

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.

Related Functions

Example of DateTime::getTimezone

Show all examples for DateTime::getTimezone

PHP Version:


Function DateTime::getTimezone:

Date and Time Functions

Most used PHP functions