The DateTimeZone class
(PHP 5 >= 5.2.0, PHP 7, PHP 8)
簡介
Representation of time zone.
類摘要
class DateTimeZone
{
/* 常量 */
/* 方法 */
public getTransitions(int
}$timestampBegin
= PHP_INT_MIN
, int $timestampEnd
= PHP_INT_MAX
): array|false預定義常量
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
-
All time zones including backwards compatible.
DateTimeZone::PER_COUNTRY
-
Time zones per country.
目錄
- DateTimeZone::__construct — 建立新的DateTimeZone對像
- DateTimeZone::getLocation — 返回與時區相關的定位資訊。
- DateTimeZone::getName — 返回時區名稱。
- DateTimeZone::getOffset — 返回相對於 GMT 的時差。
- DateTimeZone::getTransitions — Returns all transitions for the timezone
- DateTimeZone::listAbbreviations — 返回一個包含 dst (夏令時),時差和時區資訊的關聯陣列。
- DateTimeZone::listIdentifiers — 返回一個包含了所有時區標示符的索引陣列。