IntlTimeZone::getIanaID

intltz_get_iana_id

Translate a timezone identifier to its IANA equivalent

Description

Object-oriented style (method):

public static stringfalse IntlTimeZone::getIanaID(string $timezoneId)

Procedural style:

stringfalse intltz_get_iana_id(string $timezoneId)

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

  • intltz_get_id_for_windows_id
  • intltz_get_windows_id
  • intltz_create_time_zone