To clarify kay's note below, when given an empty or invalid timezone string, this function does issue a warning, but it still returns boolean(FALSE) just like the documentation says.
timezone_open
(PHP 5 >= 5.1.0)
timezone_open — Returns new DateTimeZone object
Description
DateTimeZone timezone_open
( string $timezone
)
DateTimeZone DateTimeZone::__construct
( string $timezone
)
Parameters
- timezone
-
Time zone identifier as full name (e.g. Europe/Prague) or abbreviation (e.g. CET).
Return Values
Returns DateTimeZone object on success or FALSE on failure.
timezone_open
brandon at theholbrooks dot org
31-Oct-2007 06:24
31-Oct-2007 06:24
kay
28-Oct-2007 05:14
28-Oct-2007 05:14
In case of an empty identifier the function returns a warning, not the boolean 'false'.
"Warning: timezone_open() [function.timezone-open]: Unknown or bad timezone () "
