PHP timezone_open() functiun
Example
Create a new DateTimeZone object and then return the name of the time zone:
<?php $tz=timezone_open("Asia/Shanghai"); echo timezone_name_get($tz); ?>
Definition and Usage
timezone_open() creates a new DateTimeZone object.
Syntax
timezone_open(timezone);
Parameter | Description |
---|---|
timezone |
Required. Specify the time zone. |
Technical Details
Return Value: | If successful, it returns a DateTimeZone object, and if it fails, it returns FALSE. |
---|---|
PHP Version: | 5.2+ |