The DateTimeZone class

Introduction

Representation of time zone.

Class synopsis

DateTimeZone
/* Constants */
public const int DateTimeZone::AFRICA;
public const int DateTimeZone::AMERICA;
public const int DateTimeZone::ANTARCTICA;
public const int DateTimeZone::ARCTIC;
public const int DateTimeZone::ASIA;
public const int DateTimeZone::ATLANTIC;
public const int DateTimeZone::AUSTRALIA;
public const int DateTimeZone::EUROPE;
public const int DateTimeZone::INDIAN;
public const int DateTimeZone::PACIFIC;
public const int DateTimeZone::UTC;
public const int DateTimeZone::ALL;
public const int DateTimeZone::ALL_WITH_BC;
public const int DateTimeZone::PER_COUNTRY;
/* Methods */
public __construct(string $timezone)
public arrayfalse getLocation()
public string getName()
public int getOffset(DateTimeInterface $datetime)
public arrayfalse getTransitions(int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX)
public static array listAbbreviations()
public static array listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, stringnull $countryCode = null)

Predefined Constants

DateTimeZone::AFRICA int

Africa time zones.

DateTimeZone::AMERICA int

America time zones.

DateTimeZone::ANTARCTICA int

Antarctica time zones.

DateTimeZone::ARCTIC int

Arctic time zones.

DateTimeZone::ASIA int

Asia time zones.

DateTimeZone::ATLANTIC int

Atlantic time zones.

DateTimeZone::AUSTRALIA int

Australia time zones.

DateTimeZone::EUROPE int

Europe time zones.

DateTimeZone::INDIAN int

Indian time zones.

DateTimeZone::PACIFIC int

Pacific time zones.

DateTimeZone::UTC int

UTC time zones.

DateTimeZone::ALL int

All time zones.

DateTimeZone::ALL_WITH_BC int

All time zones including backwards compatible.

DateTimeZone::PER_COUNTRY int

Time zones per country.

Changelog

Version Description
8.4.0 The class constants are now typed.
Table of Contents