8201507: Generate alias entries in j.t.f.ZoneName from tzdb at build time
authornaoto
Fri, 13 Apr 2018 10:23:01 -0700
changeset 49699 5c2cddff67b6
parent 49698 4c0c018a953f
child 49700 490292739652
8201507: Generate alias entries in j.t.f.ZoneName from tzdb at build time Reviewed-by: erikj, rriggs
make/gensrc/GensrcCLDR.gmk
make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
src/java.base/share/classes/java/time/format/ZoneName.java.template
test/jdk/java/time/test/java/time/format/ZoneName.java
--- a/make/gensrc/GensrcCLDR.gmk	Fri Apr 13 09:51:58 2018 -0700
+++ b/make/gensrc/GensrcCLDR.gmk	Fri Apr 13 10:23:01 2018 -0700
@@ -35,6 +35,7 @@
 CLDR_BASE_LOCALES := "en-US"
 
 ZONENAME_TEMPLATE := $(TOPDIR)/src/java.base/share/classes/java/time/format/ZoneName.java.template
+TZDATA_DIR := $(TOPDIR)/make/data/tzdata
 
 $(CLDR_BASEMETAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
     $(wildcard $(CLDRSRCDIR)/common/main/en*.xml) \
@@ -46,7 +47,8 @@
 	    -baselocales $(CLDR_BASE_LOCALES) \
 	    -o $(GENSRC_BASEDIR) \
 	    -basemodule \
-	    -zntempfile $(ZONENAME_TEMPLATE)
+	    -zntempfile $(ZONENAME_TEMPLATE) \
+	    -tzdatadir $(TZDATA_DIR)
 
 $(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
     $(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
--- a/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java	Fri Apr 13 09:51:58 2018 -0700
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java	Fri Apr 13 10:23:01 2018 -0700
@@ -28,6 +28,8 @@
 import static build.tools.cldrconverter.Bundle.jreTimeZoneNames;
 import build.tools.cldrconverter.BundleGenerator.BundleType;
 import java.io.File;
+import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.nio.file.*;
 import java.time.*;
 import java.util.*;
@@ -103,6 +105,7 @@
 
     private static final String[] AVAILABLE_TZIDS = TimeZone.getAvailableIDs();
     private static String zoneNameTempFile;
+    private static String tzDataDir;
 
     static enum DraftType {
         UNCONFIRMED,
@@ -203,6 +206,10 @@
                         zoneNameTempFile = args[++i];
                         break;
 
+                    case "-tzdatadir":
+                        tzDataDir = args[++i];
+                        break;
+
                     case "-help":
                         usage();
                         System.exit(0);
@@ -261,6 +268,7 @@
                 + "\t-baselocales loc(,loc)*      locales that go into the base module%n"
                 + "\t-o dir         output directory (default: ./build/gensrc)%n"
                 + "\t-zntempfile    template file for java.time.format.ZoneName.java%n"
+                + "\t-tzdatadir     tzdata directory for java.time.format.ZoneName.java%n"
                 + "\t-utf8          use UTF-8 rather than \\uxxxx (for debug)%n");
     }
 
@@ -983,6 +991,8 @@
                         return handlerMetaZones.mzoneMapEntry();
                     } else if (l.equals("%%%%DEPRECATED%%%%")) {
                         return handlerSupplMeta.deprecatedMap();
+                    } else if (l.equals("%%%%TZDATALINK%%%%")) {
+                        return tzDataLinkEntry();
                     } else {
                         return Stream.of(l);
                     }
@@ -1011,4 +1021,26 @@
                 .filter(s -> !s.isEmpty())
                 .sorted();
     }
+
+    private static Stream<String> tzDataLinkEntry() {
+        try {
+            return Files.walk(Paths.get(tzDataDir), 1)
+                .filter(p -> !Files.isDirectory(p))
+                .flatMap(CLDRConverter::extractLinks)
+                .sorted();
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    private static Stream<String> extractLinks(Path tzFile) {
+        try {
+            return Files.lines(tzFile)
+                .filter(l -> l.startsWith("Link"))
+                .map(l -> l.replaceFirst("^Link[\\s]+(\\S+)\\s+(\\S+).*",
+                                         "        \"$2\", \"$1\","));
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
 }
--- a/src/java.base/share/classes/java/time/format/ZoneName.java.template	Fri Apr 13 09:51:58 2018 -0700
+++ b/src/java.base/share/classes/java/time/format/ZoneName.java.template	Fri Apr 13 10:23:01 2018 -0700
@@ -83,142 +83,7 @@
 %%%%DEPRECATED%%%%
 
         // From tzdb
-        "Brazil/Acre", "America/Rio_Branco",
-        "US/Indiana-Starke", "America/Indiana/Knox",
-        "America/Atka", "America/Adak",
-        "America/St_Barthelemy", "America/Guadeloupe",
-        "Australia/North", "Australia/Darwin",
-        "Europe/Zagreb", "Europe/Belgrade",
-        "Etc/Universal", "Etc/UTC",
-        "NZ-CHAT", "Pacific/Chatham",
-        "Asia/Macao", "Asia/Macau",
-        "Pacific/Yap", "Pacific/Chuuk",
-        "Egypt", "Africa/Cairo",
-        "US/Central", "America/Chicago",
-        "Canada/Atlantic", "America/Halifax",
-        "Brazil/East", "America/Sao_Paulo",
-        "America/Cordoba", "America/Argentina/Cordoba",
-        "US/Hawaii", "Pacific/Honolulu",
-        "America/Louisville", "America/Kentucky/Louisville",
-        "America/Shiprock", "America/Denver",
-        "Australia/Canberra", "Australia/Sydney",
-        "Asia/Chungking", "Asia/Chongqing",
-        "Universal", "Etc/UTC",
-        "US/Alaska", "America/Anchorage",
-        "Asia/Ujung_Pandang", "Asia/Makassar",
-        "Japan", "Asia/Tokyo",
-        "Atlantic/Faeroe", "Atlantic/Faroe",
-        "Asia/Istanbul", "Europe/Istanbul",
-        "US/Pacific", "America/Los_Angeles",
-        "Mexico/General", "America/Mexico_City",
-        "Poland", "Europe/Warsaw",
-        "Africa/Asmera", "Africa/Asmara",
-        "Asia/Saigon", "Asia/Ho_Chi_Minh",
-        "US/Michigan", "America/Detroit",
-        "America/Argentina/ComodRivadavia", "America/Argentina/Catamarca",
-        "W-SU", "Europe/Moscow",
-        "Australia/ACT", "Australia/Sydney",
-        "Asia/Calcutta", "Asia/Kolkata",
-        "Arctic/Longyearbyen", "Europe/Oslo",
-        "America/Knox_IN", "America/Indiana/Knox",
-        "ROC", "Asia/Taipei",
-        "Zulu", "Etc/UTC",
-        "Australia/Yancowinna", "Australia/Broken_Hill",
-        "Australia/West", "Australia/Perth",
-        "Singapore", "Asia/Singapore",
-        "Europe/Mariehamn", "Europe/Helsinki",
-        "ROK", "Asia/Seoul",
-        "America/Porto_Acre", "America/Rio_Branco",
-        "Etc/Zulu", "Etc/UTC",
-        "Canada/Yukon", "America/Whitehorse",
-        "Europe/Vatican", "Europe/Rome",
-        "Africa/Timbuktu", "Africa/Bamako",
-        "America/Buenos_Aires", "America/Argentina/Buenos_Aires",
-        "Canada/Pacific", "America/Vancouver",
-        "US/Pacific-New", "America/Los_Angeles",
-        "Mexico/BajaNorte", "America/Tijuana",
-        "Europe/Guernsey", "Europe/London",
-        "Asia/Tel_Aviv", "Asia/Jerusalem",
-        "Chile/Continental", "America/Santiago",
-        "Jamaica", "America/Jamaica",
-        "Mexico/BajaSur", "America/Mazatlan",
-        "Canada/Eastern", "America/Toronto",
-        "Australia/Tasmania", "Australia/Hobart",
-        "NZ", "Pacific/Auckland",
-        "America/Lower_Princes", "America/Curacao",
-        "GMT-", "Etc/GMT",
-        "America/Rosario", "America/Argentina/Cordoba",
-        "Libya", "Africa/Tripoli",
-        "Asia/Ashkhabad", "Asia/Ashgabat",
-        "Australia/NSW", "Australia/Sydney",
-        "America/Marigot", "America/Guadeloupe",
-        "Europe/Bratislava", "Europe/Prague",
-        "Portugal", "Europe/Lisbon",
-        "Etc/GMT-", "Etc/GMT",
-        "Europe/San_Marino", "Europe/Rome",
-        "Europe/Sarajevo", "Europe/Belgrade",
-        "Antarctica/South_Pole", "Antarctica/McMurdo",
-        "Canada/Central", "America/Winnipeg",
-        "Etc/GMT", "Etc/GMT",
-        "Europe/Isle_of_Man", "Europe/London",
-        "America/Fort_Wayne", "America/Indiana/Indianapolis",
-        "Eire", "Europe/Dublin",
-        "America/Coral_Harbour", "America/Atikokan",
-        "Europe/Nicosia", "Asia/Nicosia",
-        "US/Samoa", "Pacific/Pago_Pago",
-        "Hongkong", "Asia/Hong_Kong",
-        "Canada/Saskatchewan", "America/Regina",
-        "Asia/Thimbu", "Asia/Thimphu",
-        "Kwajalein", "Pacific/Kwajalein",
-        "GB", "Europe/London",
-        "Chile/EasterIsland", "Pacific/Easter",
-        "US/East-Indiana", "America/Indiana/Indianapolis",
-        "Australia/LHI", "Australia/Lord_Howe",
-        "Cuba", "America/Havana",
-        "America/Jujuy", "America/Argentina/Jujuy",
-        "US/Mountain", "America/Denver",
-        "Atlantic/Jan_Mayen", "Europe/Oslo",
-        "Europe/Tiraspol", "Europe/Chisinau",
-        "Europe/Podgorica", "Europe/Belgrade",
-        "US/Arizona", "America/Phoenix",
-        "Navajo", "America/Denver",
-        "Etc/Greenwich", "Etc/GMT",
-        "Canada/Mountain", "America/Edmonton",
-        "Iceland", "Atlantic/Reykjavik",
-        "Australia/Victoria", "Australia/Melbourne",
-        "Australia/South", "Australia/Adelaide",
-        "Brazil/West", "America/Manaus",
-        "Pacific/Ponape", "Pacific/Pohnpei",
-        "Europe/Ljubljana", "Europe/Belgrade",
-        "Europe/Jersey", "Europe/London",
-        "Australia/Queensland", "Australia/Brisbane",
-        "UTC", "Etc/UTC",
-        "Canada/Newfoundland", "America/St_Johns",
-        "Europe/Skopje", "Europe/Belgrade",
-        "PRC", "Asia/Shanghai",
-        "UCT", "Etc/UCT",
-        "America/Mendoza", "America/Argentina/Mendoza",
-        "Israel", "Asia/Jerusalem",
-        "US/Eastern", "America/New_York",
-        "Asia/Ulan_Bator", "Asia/Ulaanbaatar",
-        "Turkey", "Europe/Istanbul",
-        "GMT", "Etc/GMT",
-        "US/Aleutian", "America/Adak",
-        "Brazil/DeNoronha", "America/Noronha",
-        "GB-Eire", "Europe/London",
-        "Asia/Dacca", "Asia/Dhaka",
-        "America/Ensenada", "America/Tijuana",
-        "America/Catamarca", "America/Argentina/Catamarca",
-        "Iran", "Asia/Tehran",
-        "Greenwich", "Etc/GMT",
-        "Pacific/Truk", "Pacific/Chuuk",
-        "Pacific/Samoa", "Pacific/Pago_Pago",
-        "America/Virgin", "America/St_Thomas",
-        "Asia/Katmandu", "Asia/Kathmandu",
-        "America/Indianapolis", "America/Indiana/Indianapolis",
-        "Europe/Belfast", "Europe/London",
-        "America/Kralendijk", "America/Curacao",
-        "Asia/Rangoon", "Asia/Yangon",
+%%%%TZDATALINK%%%%
     };
 
     private static final Map<String, String> zidToMzone = new HashMap<>();
--- a/test/jdk/java/time/test/java/time/format/ZoneName.java	Fri Apr 13 09:51:58 2018 -0700
+++ b/test/jdk/java/time/test/java/time/format/ZoneName.java	Fri Apr 13 10:23:01 2018 -0700
@@ -770,142 +770,214 @@
         "SystemV/YST9YDT", "America/Anchorage",
 
         // From tzdb
-        "Brazil/Acre", "America/Rio_Branco",
-        "US/Indiana-Starke", "America/Indiana/Knox",
+        "Africa/Addis_Ababa", "Africa/Nairobi",
+        "Africa/Asmara", "Africa/Nairobi",
+        "Africa/Asmera", "Africa/Nairobi",
+        "Africa/Bamako", "Africa/Abidjan",
+        "Africa/Bangui", "Africa/Lagos",
+        "Africa/Banjul", "Africa/Abidjan",
+        "Africa/Blantyre", "Africa/Maputo",
+        "Africa/Brazzaville", "Africa/Lagos",
+        "Africa/Bujumbura", "Africa/Maputo",
+        "Africa/Conakry", "Africa/Abidjan",
+        "Africa/Dakar", "Africa/Abidjan",
+        "Africa/Dar_es_Salaam", "Africa/Nairobi",
+        "Africa/Djibouti", "Africa/Nairobi",
+        "Africa/Douala", "Africa/Lagos",
+        "Africa/Freetown", "Africa/Abidjan",
+        "Africa/Gaborone", "Africa/Maputo",
+        "Africa/Harare", "Africa/Maputo",
+        "Africa/Kampala", "Africa/Nairobi",
+        "Africa/Kigali", "Africa/Maputo",
+        "Africa/Kinshasa", "Africa/Lagos",
+        "Africa/Libreville", "Africa/Lagos",
+        "Africa/Lome", "Africa/Abidjan",
+        "Africa/Luanda", "Africa/Lagos",
+        "Africa/Lubumbashi", "Africa/Maputo",
+        "Africa/Lusaka", "Africa/Maputo",
+        "Africa/Malabo", "Africa/Lagos",
+        "Africa/Maseru", "Africa/Johannesburg",
+        "Africa/Mbabane", "Africa/Johannesburg",
+        "Africa/Mogadishu", "Africa/Nairobi",
+        "Africa/Niamey", "Africa/Lagos",
+        "Africa/Nouakchott", "Africa/Abidjan",
+        "Africa/Ouagadougou", "Africa/Abidjan",
+        "Africa/Porto-Novo", "Africa/Lagos",
+        "Africa/Timbuktu", "Africa/Abidjan",
+        "America/Anguilla", "America/Port_of_Spain",
+        "America/Antigua", "America/Port_of_Spain",
+        "America/Argentina/ComodRivadavia", "America/Argentina/Catamarca",
+        "America/Aruba", "America/Curacao",
         "America/Atka", "America/Adak",
-        "America/St_Barthelemy", "America/Guadeloupe",
-        "Australia/North", "Australia/Darwin",
-        "Europe/Zagreb", "Europe/Belgrade",
-        "Etc/Universal", "Etc/UTC",
-        "NZ-CHAT", "Pacific/Chatham",
-        "Asia/Macao", "Asia/Macau",
-        "Pacific/Yap", "Pacific/Chuuk",
-        "Egypt", "Africa/Cairo",
-        "US/Central", "America/Chicago",
-        "Canada/Atlantic", "America/Halifax",
-        "Brazil/East", "America/Sao_Paulo",
+        "America/Buenos_Aires", "America/Argentina/Buenos_Aires",
+        "America/Catamarca", "America/Argentina/Catamarca",
+        "America/Cayman", "America/Panama",
+        "America/Coral_Harbour", "America/Atikokan",
         "America/Cordoba", "America/Argentina/Cordoba",
-        "US/Hawaii", "Pacific/Honolulu",
+        "America/Dominica", "America/Port_of_Spain",
+        "America/Ensenada", "America/Tijuana",
+        "America/Fort_Wayne", "America/Indiana/Indianapolis",
+        "America/Grenada", "America/Port_of_Spain",
+        "America/Guadeloupe", "America/Port_of_Spain",
+        "America/Indianapolis", "America/Indiana/Indianapolis",
+        "America/Jujuy", "America/Argentina/Jujuy",
+        "America/Knox_IN", "America/Indiana/Knox",
+        "America/Kralendijk", "America/Curacao",
         "America/Louisville", "America/Kentucky/Louisville",
+        "America/Lower_Princes", "America/Curacao",
+        "America/Marigot", "America/Port_of_Spain",
+        "America/Mendoza", "America/Argentina/Mendoza",
+        "America/Montreal", "America/Toronto",
+        "America/Montserrat", "America/Port_of_Spain",
+        "America/Porto_Acre", "America/Rio_Branco",
+        "America/Rosario", "America/Argentina/Cordoba",
+        "America/Santa_Isabel", "America/Tijuana",
         "America/Shiprock", "America/Denver",
-        "Australia/Canberra", "Australia/Sydney",
-        "Asia/Chungking", "Asia/Chongqing",
-        "Universal", "Etc/UTC",
-        "US/Alaska", "America/Anchorage",
-        "Asia/Ujung_Pandang", "Asia/Makassar",
-        "Japan", "Asia/Tokyo",
-        "Atlantic/Faeroe", "Atlantic/Faroe",
-        "Asia/Istanbul", "Europe/Istanbul",
-        "US/Pacific", "America/Los_Angeles",
-        "Mexico/General", "America/Mexico_City",
-        "Poland", "Europe/Warsaw",
-        "Africa/Asmera", "Africa/Asmara",
-        "Asia/Saigon", "Asia/Ho_Chi_Minh",
-        "US/Michigan", "America/Detroit",
-        "America/Argentina/ComodRivadavia", "America/Argentina/Catamarca",
-        "W-SU", "Europe/Moscow",
-        "Australia/ACT", "Australia/Sydney",
+        "America/St_Barthelemy", "America/Port_of_Spain",
+        "America/St_Kitts", "America/Port_of_Spain",
+        "America/St_Lucia", "America/Port_of_Spain",
+        "America/St_Thomas", "America/Port_of_Spain",
+        "America/St_Vincent", "America/Port_of_Spain",
+        "America/Tortola", "America/Port_of_Spain",
+        "America/Virgin", "America/Port_of_Spain",
+        "Antarctica/McMurdo", "Pacific/Auckland",
+        "Antarctica/South_Pole", "Pacific/Auckland",
+        "Arctic/Longyearbyen", "Europe/Oslo",
+        "Asia/Aden", "Asia/Riyadh",
+        "Asia/Ashkhabad", "Asia/Ashgabat",
+        "Asia/Bahrain", "Asia/Qatar",
         "Asia/Calcutta", "Asia/Kolkata",
-        "Arctic/Longyearbyen", "Europe/Oslo",
-        "America/Knox_IN", "America/Indiana/Knox",
-        "ROC", "Asia/Taipei",
-        "Zulu", "Etc/UTC",
-        "Australia/Yancowinna", "Australia/Broken_Hill",
+        "Asia/Chongqing", "Asia/Shanghai",
+        "Asia/Chungking", "Asia/Shanghai",
+        "Asia/Dacca", "Asia/Dhaka",
+        "Asia/Harbin", "Asia/Shanghai",
+        "Asia/Istanbul", "Europe/Istanbul",
+        "Asia/Kashgar", "Asia/Urumqi",
+        "Asia/Katmandu", "Asia/Kathmandu",
+        "Asia/Kuwait", "Asia/Riyadh",
+        "Asia/Macao", "Asia/Macau",
+        "Asia/Muscat", "Asia/Dubai",
+        "Asia/Phnom_Penh", "Asia/Bangkok",
+        "Asia/Rangoon", "Asia/Yangon",
+        "Asia/Saigon", "Asia/Ho_Chi_Minh",
+        "Asia/Tel_Aviv", "Asia/Jerusalem",
+        "Asia/Thimbu", "Asia/Thimphu",
+        "Asia/Ujung_Pandang", "Asia/Makassar",
+        "Asia/Ulan_Bator", "Asia/Ulaanbaatar",
+        "Asia/Vientiane", "Asia/Bangkok",
+        "Atlantic/Faeroe", "Atlantic/Faroe",
+        "Atlantic/Jan_Mayen", "Europe/Oslo",
+        "Atlantic/St_Helena", "Africa/Abidjan",
+        "Australia/ACT", "Australia/Sydney",
+        "Australia/Canberra", "Australia/Sydney",
+        "Australia/LHI", "Australia/Lord_Howe",
+        "Australia/NSW", "Australia/Sydney",
+        "Australia/North", "Australia/Darwin",
+        "Australia/Queensland", "Australia/Brisbane",
+        "Australia/South", "Australia/Adelaide",
+        "Australia/Tasmania", "Australia/Hobart",
+        "Australia/Victoria", "Australia/Melbourne",
         "Australia/West", "Australia/Perth",
-        "Singapore", "Asia/Singapore",
-        "Europe/Mariehamn", "Europe/Helsinki",
-        "ROK", "Asia/Seoul",
-        "America/Porto_Acre", "America/Rio_Branco",
-        "Etc/Zulu", "Etc/UTC",
-        "Canada/Yukon", "America/Whitehorse",
-        "Europe/Vatican", "Europe/Rome",
-        "Africa/Timbuktu", "Africa/Bamako",
-        "America/Buenos_Aires", "America/Argentina/Buenos_Aires",
+        "Australia/Yancowinna", "Australia/Broken_Hill",
+        "Brazil/Acre", "America/Rio_Branco",
+        "Brazil/DeNoronha", "America/Noronha",
+        "Brazil/East", "America/Sao_Paulo",
+        "Brazil/West", "America/Manaus",
+        "Canada/Atlantic", "America/Halifax",
+        "Canada/Central", "America/Winnipeg",
+        "Canada/Eastern", "America/Toronto",
+        "Canada/Mountain", "America/Edmonton",
+        "Canada/Newfoundland", "America/St_Johns",
         "Canada/Pacific", "America/Vancouver",
-        "US/Pacific-New", "America/Los_Angeles",
-        "Mexico/BajaNorte", "America/Tijuana",
-        "Europe/Guernsey", "Europe/London",
-        "Asia/Tel_Aviv", "Asia/Jerusalem",
+        "Canada/Saskatchewan", "America/Regina",
+        "Canada/Yukon", "America/Whitehorse",
         "Chile/Continental", "America/Santiago",
-        "Jamaica", "America/Jamaica",
-        "Mexico/BajaSur", "America/Mazatlan",
-        "Canada/Eastern", "America/Toronto",
-        "Australia/Tasmania", "Australia/Hobart",
-        "NZ", "Pacific/Auckland",
-        "America/Lower_Princes", "America/Curacao",
-        "GMT-", "Etc/GMT",
-        "America/Rosario", "America/Argentina/Cordoba",
-        "Libya", "Africa/Tripoli",
-        "Asia/Ashkhabad", "Asia/Ashgabat",
-        "Australia/NSW", "Australia/Sydney",
-        "America/Marigot", "America/Guadeloupe",
+        "Chile/EasterIsland", "Pacific/Easter",
+        "Cuba", "America/Havana",
+        "Egypt", "Africa/Cairo",
+        "Eire", "Europe/Dublin",
+        "Etc/GMT+0", "Etc/GMT",
+        "Etc/GMT-0", "Etc/GMT",
+        "Etc/GMT0", "Etc/GMT",
+        "Etc/Greenwich", "Etc/GMT",
+        "Etc/Universal", "Etc/UTC",
+        "Etc/Zulu", "Etc/UTC",
+        "Europe/Belfast", "Europe/London",
         "Europe/Bratislava", "Europe/Prague",
-        "Portugal", "Europe/Lisbon",
-        "Etc/GMT-", "Etc/GMT",
+        "Europe/Busingen", "Europe/Zurich",
+        "Europe/Guernsey", "Europe/London",
+        "Europe/Isle_of_Man", "Europe/London",
+        "Europe/Jersey", "Europe/London",
+        "Europe/Ljubljana", "Europe/Belgrade",
+        "Europe/Mariehamn", "Europe/Helsinki",
+        "Europe/Nicosia", "Asia/Nicosia",
+        "Europe/Podgorica", "Europe/Belgrade",
         "Europe/San_Marino", "Europe/Rome",
         "Europe/Sarajevo", "Europe/Belgrade",
-        "Antarctica/South_Pole", "Antarctica/McMurdo",
-        "Canada/Central", "America/Winnipeg",
-        "Etc/GMT", "Etc/GMT",
-        "Europe/Isle_of_Man", "Europe/London",
-        "America/Fort_Wayne", "America/Indiana/Indianapolis",
-        "Eire", "Europe/Dublin",
-        "America/Coral_Harbour", "America/Atikokan",
-        "Europe/Nicosia", "Asia/Nicosia",
-        "US/Samoa", "Pacific/Pago_Pago",
-        "Hongkong", "Asia/Hong_Kong",
-        "Canada/Saskatchewan", "America/Regina",
-        "Asia/Thimbu", "Asia/Thimphu",
-        "Kwajalein", "Pacific/Kwajalein",
+        "Europe/Skopje", "Europe/Belgrade",
+        "Europe/Tiraspol", "Europe/Chisinau",
+        "Europe/Vaduz", "Europe/Zurich",
+        "Europe/Vatican", "Europe/Rome",
+        "Europe/Zagreb", "Europe/Belgrade",
         "GB", "Europe/London",
-        "Chile/EasterIsland", "Pacific/Easter",
-        "US/East-Indiana", "America/Indiana/Indianapolis",
-        "Australia/LHI", "Australia/Lord_Howe",
-        "Cuba", "America/Havana",
-        "America/Jujuy", "America/Argentina/Jujuy",
-        "US/Mountain", "America/Denver",
-        "Atlantic/Jan_Mayen", "Europe/Oslo",
-        "Europe/Tiraspol", "Europe/Chisinau",
-        "Europe/Podgorica", "Europe/Belgrade",
-        "US/Arizona", "America/Phoenix",
-        "Navajo", "America/Denver",
-        "Etc/Greenwich", "Etc/GMT",
-        "Canada/Mountain", "America/Edmonton",
+        "GB-Eire", "Europe/London",
+        "GMT", "Etc/GMT",
+        "GMT+0", "Etc/GMT",
+        "GMT-0", "Etc/GMT",
+        "GMT0", "Etc/GMT",
+        "Greenwich", "Etc/GMT",
+        "Hongkong", "Asia/Hong_Kong",
         "Iceland", "Atlantic/Reykjavik",
-        "Australia/Victoria", "Australia/Melbourne",
-        "Australia/South", "Australia/Adelaide",
-        "Brazil/West", "America/Manaus",
+        "Indian/Antananarivo", "Africa/Nairobi",
+        "Indian/Comoro", "Africa/Nairobi",
+        "Indian/Mayotte", "Africa/Nairobi",
+        "Iran", "Asia/Tehran",
+        "Israel", "Asia/Jerusalem",
+        "Jamaica", "America/Jamaica",
+        "Japan", "Asia/Tokyo",
+        "Kwajalein", "Pacific/Kwajalein",
+        "Libya", "Africa/Tripoli",
+        "Mexico/BajaNorte", "America/Tijuana",
+        "Mexico/BajaSur", "America/Mazatlan",
+        "Mexico/General", "America/Mexico_City",
+        "Mideast/Riyadh87", "Asia/Riyadh87",
+        "Mideast/Riyadh88", "Asia/Riyadh88",
+        "Mideast/Riyadh89", "Asia/Riyadh89",
+        "NZ", "Pacific/Auckland",
+        "NZ-CHAT", "Pacific/Chatham",
+        "Navajo", "America/Denver",
+        "PRC", "Asia/Shanghai",
+        "Pacific/Johnston", "Pacific/Honolulu",
+        "Pacific/Midway", "Pacific/Pago_Pago",
         "Pacific/Ponape", "Pacific/Pohnpei",
-        "Europe/Ljubljana", "Europe/Belgrade",
-        "Europe/Jersey", "Europe/London",
-        "Australia/Queensland", "Australia/Brisbane",
-        "UTC", "Etc/UTC",
-        "Canada/Newfoundland", "America/St_Johns",
-        "Europe/Skopje", "Europe/Belgrade",
-        "PRC", "Asia/Shanghai",
-        "UCT", "Etc/UCT",
-        "America/Mendoza", "America/Argentina/Mendoza",
-        "Israel", "Asia/Jerusalem",
-        "US/Eastern", "America/New_York",
-        "Asia/Ulan_Bator", "Asia/Ulaanbaatar",
+        "Pacific/Saipan", "Pacific/Guam",
+        "Pacific/Samoa", "Pacific/Pago_Pago",
+        "Pacific/Truk", "Pacific/Chuuk",
+        "Pacific/Yap", "Pacific/Chuuk",
+        "Poland", "Europe/Warsaw",
+        "Portugal", "Europe/Lisbon",
+        "ROC", "Asia/Taipei",
+        "ROK", "Asia/Seoul",
+        "Singapore", "Asia/Singapore",
         "Turkey", "Europe/Istanbul",
-        "GMT", "Etc/GMT",
+        "UCT", "Etc/UCT",
+        "US/Alaska", "America/Anchorage",
         "US/Aleutian", "America/Adak",
-        "Brazil/DeNoronha", "America/Noronha",
-        "GB-Eire", "Europe/London",
-        "Asia/Dacca", "Asia/Dhaka",
-        "America/Ensenada", "America/Tijuana",
-        "America/Catamarca", "America/Argentina/Catamarca",
-        "Iran", "Asia/Tehran",
-        "Greenwich", "Etc/GMT",
-        "Pacific/Truk", "Pacific/Chuuk",
-        "Pacific/Samoa", "Pacific/Pago_Pago",
-        "America/Virgin", "America/St_Thomas",
-        "Asia/Katmandu", "Asia/Kathmandu",
-        "America/Indianapolis", "America/Indiana/Indianapolis",
-        "Europe/Belfast", "Europe/London",
-        "America/Kralendijk", "America/Curacao",
-        "Asia/Rangoon", "Asia/Yangon",
+        "US/Arizona", "America/Phoenix",
+        "US/Central", "America/Chicago",
+        "US/East-Indiana", "America/Indiana/Indianapolis",
+        "US/Eastern", "America/New_York",
+        "US/Hawaii", "Pacific/Honolulu",
+        "US/Indiana-Starke", "America/Indiana/Knox",
+        "US/Michigan", "America/Detroit",
+        "US/Mountain", "America/Denver",
+        "US/Pacific", "America/Los_Angeles",
+        "US/Pacific-New", "America/Los_Angeles",
+        "US/Samoa", "Pacific/Pago_Pago",
+        "UTC", "Etc/UTC",
+        "Universal", "Etc/UTC",
+        "W-SU", "Europe/Moscow",
+        "Zulu", "Etc/UTC",
     };
 
     private static final Map<String, String> zidToMzone = new HashMap<>();