The DateTimeZone class
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
Introduction
Representation of time zone.
Class synopsis
class DateTimeZone {
/* Constants */
/* Methods */
public getTransitions(int
$timestampBegin = PHP_INT_MIN, int $timestampEnd = 2147483647): array|falsepublic static listIdentifiers(int
}$timezoneGroup = DateTimeZone::ALL, ?string $countryCode = null): arrayPredefined Constants
DateTimeZone::AFRICAintAfrica time zones.
DateTimeZone::AMERICAintAmerica time zones.
DateTimeZone::ANTARCTICAintAntarctica time zones.
DateTimeZone::ARCTICintArctic time zones.
DateTimeZone::ASIAintAsia time zones.
DateTimeZone::ATLANTICintAtlantic time zones.
DateTimeZone::AUSTRALIAintAustralia time zones.
DateTimeZone::EUROPEintEurope time zones.
DateTimeZone::INDIANintIndian time zones.
DateTimeZone::PACIFICintPacific time zones.
DateTimeZone::UTCintUTC time zones.
DateTimeZone::ALLintAll time zones.
DateTimeZone::ALL_WITH_BCintAll time zones including backwards compatible.
DateTimeZone::PER_COUNTRYintTime zones per country.
Changelog
| Version | Description |
|---|---|
| 8.4.0 | The class constants are now typed. |
Table of Contents
- DateTimeZone::__construct — Creates new DateTimeZone object
- DateTimeZone::getLocation — Returns location information for a timezone
- DateTimeZone::getName — Returns the name of the timezone
- DateTimeZone::getOffset — Returns the timezone offset from GMT
- DateTimeZone::getTransitions — Returns all transitions for the timezone
- DateTimeZone::listAbbreviations — Returns associative array containing dst, offset and the timezone name
- DateTimeZone::listIdentifiers — Returns a numerically indexed array containing all defined timezone identifiers
↑ and ↓ to navigate • Enter to select • Esc to close • / to open