(PHP 5 >= 5.2.0, PHP 7, PHP 8)
Introduction
Représentation d'un fuseau horaire.
Synopsis de la classe
class
DateTimeZone
{
/* Constantes */
public
const
int
AFRICA;
public
const
int
AMERICA;
public
const
int
ANTARCTICA;
public
const
int
ARCTIC;
public
const
int
ASIA;
public
const
int
ATLANTIC;
public
const
int
AUSTRALIA;
public
const
int
EUROPE;
public
const
int
INDIAN;
public
const
int
PACIFIC;
public
const
int
UTC;
public
const
int
ALL;
public
const
int
ALL_WITH_BC;
public
const
int
PER_COUNTRY;
/* Méthodes */
public __construct(string
$timezone
)
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
}
Constantes pré-définies
DateTimeZone::AFRICA
-
Fuseau africain.
DateTimeZone::AMERICA
-
Fuseau américain.
DateTimeZone::ANTARCTICA
-
Fuseau antarctique.
DateTimeZone::ARCTIC
-
Fuseau arctique.
DateTimeZone::ASIA
-
Fuseau asiatique.
DateTimeZone::ATLANTIC
-
Fuseau atlantique.
DateTimeZone::AUSTRALIA
-
Fuseau australien.
DateTimeZone::EUROPE
-
Fuseau européen.
DateTimeZone::INDIAN
-
Fuseau indien.
DateTimeZone::PACIFIC
-
Fuseau pacifique.
DateTimeZone::UTC
-
Fuseau UTC.
DateTimeZone::ALL
-
Tous les fuseaux.
DateTimeZone::ALL_WITH_BC
-
Tous les fuseaux, y compris les anciens.
DateTimeZone::PER_COUNTRY
-
Fuseaux horaires par pays.
Sommaire
- DateTimeZone::__construct — Crée un nouvel objet DateTimeZone
- DateTimeZone::getLocation — Retourne les informations géographiques d'un fuseau horaire
- DateTimeZone::getName — Retourne le nom du fuseau horaire
- DateTimeZone::getOffset — Retourne le décalage GMT d'un fuseau horaire
- DateTimeZone::getTransitions — Retourne toutes les transitions d'un fuseau horaire
- DateTimeZone::listAbbreviations — Retourne un tableau associatif, décrivant un fuseau horaire
- DateTimeZone::listIdentifiers — Retourne un tableau numérique contenant tous les identifiants de fuseaux horaires définis