PHP 8.6.0 Beta 1 is available for testing

La clase DateTimeZone

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

Introducción

Representación de una zona horaria.

Sinopsis de la clase

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étodos */
public function __construct (string $timezone)
public function getLocation (): array |false
public function getName (): string
public function getOffset (DateTimeInterface $datetime): int
public function getTransitions (int $timestampBegin = PHP_INT_MIN , int $timestampEnd = 2147483647): array |false
public static function listAbbreviations (): array
public static function listIdentifiers (int $timezoneGroup = DateTimeZone::ALL , ? string $countryCode = null ): array
}

Constantes predefinidas

DateTimeZone::AFRICA int

Zona africana.

DateTimeZone::AMERICA int

Zona americana.

DateTimeZone::ANTARCTICA int

Zona antártica.

DateTimeZone::ARCTIC int

Zona ártica.

DateTimeZone::ASIA int

Zona asiática.

DateTimeZone::ATLANTIC int

Zona atlántica.

DateTimeZone::AUSTRALIA int

Zona australiana.

DateTimeZone::EUROPE int

Zona europea.

DateTimeZone::INDIAN int

Zona india.

DateTimeZone::PACIFIC int

Zona del Pacífico.

DateTimeZone::UTC int

Zona UTC.

DateTimeZone::ALL int

Todas las zonas.

DateTimeZone::ALL_WITH_BC int

Todas las zonas, incluyendo las antiguas.

DateTimeZone::PER_COUNTRY int

Zonas horarias por país.

Historial de cambios

Versión Descripción
8.4.0 Las constantes de clase ahora están tipadas.

Tabla de contenidos

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes

There are no user contributed notes for this page.

AltStyle によって変換されたページ (->オリジナル) /