Skip to content

Commit 5ccb26f

Browse files
committed
No territory for utc, gmt, utc.. timezones
1 parent f2bcabf commit 5ccb26f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

mix/support/consolidate.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,8 @@ defmodule Cldr.Consolidate do
930930
assert_package_file_configured!(path)
931931
end
932932

933+
@zones_with_no_territory ["gmt", "unk"]
934+
933935
def save_timezones do
934936
import SweetXml
935937
path = Path.join(consolidated_output_dir(), "timezones.json")
@@ -950,6 +952,12 @@ defmodule Cldr.Consolidate do
950952
)
951953

952954
Enum.map(timezones, fn
955+
%{alias: aliases, name: "ut" <> _rest = name, region: "", preferred: ""} ->
956+
{name, %{aliases: String.split(aliases, " "), territory: nil, preferred: nil}}
957+
958+
%{alias: aliases, name: name, region: "", preferred: ""} when name in @zones_with_no_territory ->
959+
{name, %{aliases: String.split(aliases, " "), territory: nil, preferred: nil}}
960+
953961
%{alias: aliases, name: name, region: "", preferred: ""} ->
954962
region = String.slice(name, 0, 2) |> String.upcase() |> String.to_atom()
955963
{name, %{aliases: String.split(aliases, " "), territory: region, preferred: nil}}

0 commit comments

Comments
 (0)