PHP DateTimeZone class
The PHP DateTimeZone class is a representation of time zone.
Class synopsis
class DateTimeZone { //Constants const int AFRICA = 1; const int AMERICA = 2; const int ANTARCTICA = 4; const int ARCTIC = 8; const int ASIA = 16; const int ATLANTIC = 32; const int AUSTRALIA = 64; const int EUROPE = 128; const int INDIAN = 256; const int PACIFIC = 512; const int UTC = 1024; const int ALL = 2047; const int ALL_WITH_BC = 4095; const int PER_COUNTRY = 4096; //Methods public __construct(string $timezone) public getLocation(): array|false public getName(): string public getOffset(DateTimeInterface $datetime): int public getTransitions(int $timestampBegin = PHP_INT_MIN, int $timestampEnd = PHP_INT_MAX): array|false public static listAbbreviations(): array public static listIdentifiers(int $timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null): array }
Predefined Constants
DateTimeZone::AFRICAAfrica time zones.
DateTimeZone::AMERICAAmerica time zones.
DateTimeZone::ANTARCTICAAntarctica time zones.
DateTimeZone::ARCTICArctic time zones.
DateTimeZone::ASIAAsia time zones.
DateTimeZone::ATLANTICAtlantic time zones.
DateTimeZone::AUSTRALIAAustralia time zones.
DateTimeZone::EUROPEEurope time zones.
DateTimeZone::INDIANIndian time zones.
DateTimeZone::PACIFICPacific time zones.
DateTimeZone::UTCUTC time zones.
DateTimeZone::ALLAll time zones.
DateTimeZone::ALL_WITH_BCAll time zones including backwards compatible.
DateTimeZone::PER_COUNTRYTime zones per country.
❮ PHP Date and Time Reference