Definition :
In php timezone_open() Function is inbuilt function.PHP timezone_open() function is used to create a new DateTimeZone object. It accepts only a single parameter $timezone which specify the timezone of the new DateTimeZone object to be created. It returns the DateTimeZone object as output on success and False on failure.
Syntax:
timezone_open(timezone);
Parameter | Description |
---|---|
timezone | This is a required parameter. This parameter definesthe timezone. |
Given below example create a new DateTimeZone object, then return the name of the timezone:
Output : Asia/Calcutta