@@ -786,7 +786,10 @@ private static Map<String, Object> extractZoneNames(Map<String, Object> map, Str
786786 String tzKey = Optional .ofNullable ((String )handlerSupplMeta .get (tzid ))
787787 .orElse (tzid );
788788 // Follow link, if needed
789- var tzLink = tzdbLinks .get (tzKey );
789+ String tzLink = null ;
790+ for (var k = tzKey ; tzdbLinks .containsKey (k );) {
791+ k = tzLink = tzdbLinks .get (k );
792+ }
790793 if (tzLink == null && tzdbLinks .containsValue (tzKey )) {
791794 // reverse link search
792795 // this is needed as in tzdb, "America/Buenos_Aires" links to
@@ -1214,7 +1217,7 @@ private static void generateZoneName() throws Exception {
12141217 private static Set <String > getAvailableZoneIds () {
12151218 assert handlerMetaZones != null ;
12161219 if (AVAILABLE_TZIDS == null ) {
1217- AVAILABLE_TZIDS = new HashSet <>(ZoneId . getAvailableZoneIds ( ));
1220+ AVAILABLE_TZIDS = new HashSet <>(Arrays . asList ( TimeZone . getAvailableIDs () ));
12181221 AVAILABLE_TZIDS .addAll (handlerMetaZones .keySet ());
12191222 AVAILABLE_TZIDS .remove (MetaZonesParseHandler .NO_METAZONE_KEY );
12201223 }
@@ -1491,13 +1494,14 @@ private static void fillTZDBShortNames(String tzid, String[] names) {
14911494 /*
14921495 * Convert TZDB offsets to JDK's offsets, eg, "-08" to "GMT-08:00".
14931496 * If it cannot recognize the pattern, return the argument as is.
1497+ * Returning null results in generating the GMT format at runtime.
14941498 */
14951499 private static String convertGMTName (String f ) {
14961500 try {
1497- // Should pre-fill GMT format once COMPAT is gone.
1498- // Till then, fall back to GMT format at runtime, after COMPAT short
1499- // names are populated
1500- ZoneOffset . of ( f );
1501+ if (! f . equals ( "%z" )) {
1502+ // Validate if the format is an offset
1503+ ZoneOffset . of ( f );
1504+ }
15011505 return null ;
15021506 } catch (DateTimeException dte ) {
15031507 // textual representation. return as is
0 commit comments