IntlTimeZone
class IntlTimeZone (View source)
Constants
DISPLAY_SHORT |
|
DISPLAY_LONG |
|
DISPLAY_SHORT_GENERIC |
|
DISPLAY_LONG_GENERIC |
|
DISPLAY_SHORT_GMT |
|
DISPLAY_LONG_GMT |
|
DISPLAY_SHORT_COMMONLY_USED |
|
DISPLAY_GENERIC_LOCATION |
|
TYPE_ANY |
|
TYPE_CANONICAL |
|
TYPE_CANONICAL_LOCATION |
|
Methods
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the number of IDs in the equivalency group that includes the given ID
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a new copy of the default timezone for this host
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get an enumeration over time zone IDs associated with the given country or offset
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a timezone object for the given ID
(PHP 5 >=5.5.0)
Get an enumeration over system time zone IDs with the given filter conditions
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a timezone object from DateTimeZone
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get a name of this time zone suitable for presentation to the user
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the amount of time to be added to local standard time to get local wall clock time
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get an ID in the equivalency group that includes the given ID
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get last error code on the object
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get last error message on the object
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create GMT (UTC) timezone
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get timezone ID
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the time zone raw and GMT offset for the given moment in time
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the raw GMT offset (before taking daylight savings time into account
(PHP 5 >=5.5.0)
Get the region code associated with the given system time zone ID
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the timezone data version currently used by ICU
(PHP 5 >=5.5.0)
Get the "unknown" time zone
(PHP 7 >=7.1.0)
Translates a system timezone (e.g. "America/Los_Angeles") into a Windows
timezone (e.g. "Pacific Standard Time").
No description
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Check if this zone has the same rules and offset as another zone
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Convert to DateTimeZone object
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Check if this time zone uses daylight savings time
No description
Details
static int|false
countEquivalentIDs(string $timezoneId)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the number of IDs in the equivalency group that includes the given ID
static IntlTimeZone
createDefault()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a new copy of the default timezone for this host
static IntlIterator|false
createEnumeration(mixed $countryOrRawOffset)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get an enumeration over time zone IDs associated with the given country or offset
static IntlTimeZone|null
createTimeZone(string $timezoneId)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a timezone object for the given ID
static IntlIterator|false
createTimeZoneIDEnumeration(int $type, string|null $region = null, int $rawOffset = null)
(PHP 5 >=5.5.0)
Get an enumeration over system time zone IDs with the given filter conditions
static IntlTimeZone|null
fromDateTimeZone(DateTimeZone $timezone)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create a timezone object from DateTimeZone
static string|false
getCanonicalID(string $timezoneId, bool $isSystemId)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the canonical system timezone ID or the normalized custom time zone ID for the given time zone ID
string|false
getDisplayName(bool $dst = false, int $style = 2, string $locale)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get a name of this time zone suitable for presentation to the user
int
getDSTSavings()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the amount of time to be added to local standard time to get local wall clock time
static string|false
getEquivalentID(string $timezoneId, int $offset)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get an ID in the equivalency group that includes the given ID
int|false
getErrorCode()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get last error code on the object
string|false
getErrorMessage()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get last error message on the object
static IntlTimeZone
getGMT()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Create GMT (UTC) timezone
string|false
getID()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get timezone ID
bool
getOffset(float $timestamp, bool $local, int $rawOffset, int $dstOffset)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the time zone raw and GMT offset for the given moment in time
int
getRawOffset()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the raw GMT offset (before taking daylight savings time into account
static string|false
getRegion(string $timezoneId)
(PHP 5 >=5.5.0)
Get the region code associated with the given system time zone ID
static string|false
getTZDataVersion()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Get the timezone data version currently used by ICU
static IntlTimeZone
getUnknown()
(PHP 5 >=5.5.0)
Get the "unknown" time zone
static string|false
getWindowsID(string $timezoneId)
(PHP 7 >=7.1.0)
Translates a system timezone (e.g. "America/Los_Angeles") into a Windows
timezone (e.g. "Pacific Standard Time").
static string|false
getIDForWindowsID(string $timezoneId, string|null $region = null)
No description
bool
hasSameRules(IntlTimeZone $other)
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Check if this zone has the same rules and offset as another zone
DateTimeZone|false
toDateTimeZone()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Convert to DateTimeZone object
bool
useDaylightTime()
(PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)
Check if this time zone uses daylight savings time
static string|false
getIanaID(string $timezoneId)
No description