php8.5
Home/ Manual/ intl / intltimezone/ IntlTimeZone::getIanaID

IntlTimeZone::getIanaID

PHP function Edit on GitHub ✎

(PHP 8 >= 8.4.0)

Translate a timezone identifier to its IANA equivalent

Description

Oop (method):

IntlTimeZone::getIanaID(string $timezoneId): string|false

Procedural:

intltz_get_iana_id(string $timezoneId): string|false

Translates a timezone identifier to its IANA equivalent. For example, "GMT" returns "Etc/GMT", and "US/Eastern" returns "America/New_York".

Note

This function requires ICU version >= 74.

Parameters

timezoneId

The timezone identifier to translate.

Return Values

Returns the IANA timezone identifier as a String, or false on failure.

See Also

Source: reference/intl/intltimezone/getianaid.xml · from the official PHP manual (php/doc-en)