Cldr.DateTime.Formatter.zone_id
You're seeing just the function
zone_id, go back to Cldr.DateTime.Formatter module for more information.
Specs
zone_id(Calendar.time(), integer(), Keyword.t()) :: String.t() | {:error, String.t()}
Returns the time zone ID (format symbol V) part of a DateTime or Time
For now the short timezone name, exemplar city and generic location formats are not supported and therefore return the fallbacks defined in CLDR.
Arguments
timeis aTimestruct or any map that contains at least the:utc_offsetand:std_offsetkeys of the format used byTimenis the specific non-location timezone format and is in the range1..4localeis any valid locale name returned byCldr.known_locale_names/0or aCldr.LanguageTagstruct. The default isCldr.get_locale/0optionsis aKeywordlist of options. There are no options used inzone_id/4
Format Symbol
The representation of the timezone ID is made in accordance with the following
table:
| Symbol | Results | Description |
|---|---|---|
| V | "unk" | :zone_abbr key, unlocalised |
| VV | "Etc/UTC | Delegates to zone_gmt/4 |
| VVV | "Unknown City" | Examplar city. Not supported. |
| VVVV | "GMT" | Delegates to `zone_gmt/4 |
Examples
iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...> utc_offset: 0, std_offset: 0}, 1
"unk"
iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...> utc_offset: 0, std_offset: 0}, 2
"Etc/UTC"
iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...> utc_offset: 0, std_offset: 0}, 3
"Unknown City"
iex> Cldr.DateTime.Formatter.zone_id %{time_zone: "Etc/UTC",
...> utc_offset: 0, std_offset: 0}, 4
"GMT"
Specs
zone_id(Calendar.time(), integer(), locale(), Cldr.backend(), Keyword.t()) :: String.t() | {:error, String.t()}