Definition :
In php date_timezone_get() Function is inbuilt function.PHP date_timezone_get() function is used to return time zone relative to given DateTime value. It returns a DateTimeZone object as output on success or False on failure. It accepts only a single parameter $object which is the DateTime object returned by the date_create() function.
date_timezone_get(object)
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). |
Given below example the date_timezone_get() function returns the time zone of the given DateTime object.
Output : Asia/kolkata