DateTimeZone::__construct

DateTimeZone::__construct - Creates new DateTimeZone object
Manual
Code Examples

timezone_open( string$timezone ): DateTimeZone|false

Creates new DateTimeZone object.

Parameters

timezone

One of the supported timezone names or an offset value (+0200).

Return Values

Returns DateTimeZone on success. Procedural style returns false on failure.

Exceptions and Errors

This method throws Exception if the timezone supplied is not recognised as a valid timezone.

Example of DateTimeZone::__construct

Show all examples for DateTimeZone::__construct

PHP Version:


Function DateTimeZone::__construct:

Date and Time Functions

Most used PHP functions