PHP date_timezone_get() Function

6 Jan 2025 | 1 min read

This date_timezone-get() function is used to return the time zone of the given DateTime object in the script.

Syntax

Parameters

ParameterDescriptionRequired/Optional
objectSpecifies a DateTime objectrequired

Return Values

This function returns the DateTimeZone object on success or FALSE on failure.

Example 1

Output:

 Indian/Maldives 

Example 2

Output:

 Pacific/Easter 

Example 3

Output:

 Europe/Istanbul