DateTimeZone 클래스

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


소개

시간대 표현.


클래스 개요

                  
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
}
                  
                

미리 정의된 상수

DateTimeZone::AFRICA
Africa time zones.
DateTimeZone::AMERICA
America time zones.
DateTimeZone::ANTARCTICA
Antarctica time zones.
DateTimeZone::ARCTIC
Arctic time zones.
DateTimeZone::ASIA
Asia time zones.
DateTimeZone::ATLANTIC
Atlantic time zones.
DateTimeZone::AUSTRALIA
Australia time zones.
DateTimeZone::EUROPE
Europe time zones.
DateTimeZone::INDIAN
Indian time zones.
DateTimeZone::PACIFIC
Pacific time zones.
DateTimeZone::UTC
UTC time zones.
DateTimeZone::ALL
All time zones.
DateTimeZone::ALL_WITH_BC
이전 버전과 호환되는 모든 시간대.
DateTimeZone::PER_COUNTRY
국가별 시간대.

목차