PHP timezone_open() Function
PHP Date/Time Reference Manual
Example
Create a new DateTimeZone object and return the name of the time zone:
Run Example »
Definition and Usage
timezone_open() creates a new DateTimeZone object.
Syntax
timezone_open(
timezone);
| Parameters | Description |
|---|---|
| timezone | Required. Specifies a time zone. |
**提示:** [查看 PHP 中支持的所有时区列表](php-ref-timezones.html) |
Technical Details
| Return Value: | Returns a DateTimeZone object on success, or FALSE on failure. |
|---|---|
| PHP Version: | 5.2+ |
PHP Date/Time Reference Manual