mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 06:29:37 +00:00
8384042: [BACKOUT] Incorrect handling of Hawaii_Aleutian metazone
Reviewed-by: jlu, iris
This commit is contained in:
parent
e324174148
commit
7bf1de524c
@ -815,28 +815,6 @@ public class CLDRConverter {
|
||||
data = map.get(TIMEZONE_ID_PREFIX + tzLink);
|
||||
}
|
||||
|
||||
// Process metazones first, if any
|
||||
String meta = handlerMetaZones.get(tzKey);
|
||||
String[] metaNames = null;
|
||||
if (meta == null && tzLink != null) {
|
||||
// Check for tzLink
|
||||
meta = handlerMetaZones.get(tzLink);
|
||||
}
|
||||
if (meta != null) {
|
||||
var metaKey = METAZONE_ID_PREFIX + meta;
|
||||
if (map.get(metaKey) instanceof String[] mn) {
|
||||
metaNames = mn;
|
||||
}
|
||||
if (metaNames != null && isDefaultZone(meta, tzKey)) {
|
||||
// Record the metazone names only from the default
|
||||
// (001) zone, with short names filled from TZDB
|
||||
metaNames = Arrays.copyOf(metaNames, metaNames.length);
|
||||
fillTZDBShortNames(tzKey, metaNames);
|
||||
names.put(metaKey, metaNames);
|
||||
}
|
||||
}
|
||||
|
||||
// Put regular time zones
|
||||
if (data instanceof String[] tznames) {
|
||||
// Hack for UTC. UTC is an alias to Etc/UTC in CLDR
|
||||
if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) {
|
||||
@ -850,10 +828,26 @@ public class CLDRConverter {
|
||||
names.put(tzid, tznames);
|
||||
}
|
||||
} else {
|
||||
if (metaNames != null) {
|
||||
names.put(tzid, meta);
|
||||
if (tzLink != null && availableIds.contains(tzLink)) {
|
||||
names.put(tzLink, meta);
|
||||
String meta = handlerMetaZones.get(tzKey);
|
||||
if (meta == null && tzLink != null) {
|
||||
// Check for tzLink
|
||||
meta = handlerMetaZones.get(tzLink);
|
||||
}
|
||||
if (meta != null) {
|
||||
String metaKey = METAZONE_ID_PREFIX + meta;
|
||||
data = map.get(metaKey);
|
||||
if (data instanceof String[] tznames) {
|
||||
if (isDefaultZone(meta, tzKey)) {
|
||||
// Record the metazone names only from the default
|
||||
// (001) zone, with short names filled from TZDB
|
||||
tznames = Arrays.copyOf(tznames, tznames.length);
|
||||
fillTZDBShortNames(tzKey, tznames);
|
||||
names.put(metaKey, tznames);
|
||||
}
|
||||
names.put(tzid, meta);
|
||||
if (tzLink != null && availableIds.contains(tzLink)) {
|
||||
names.put(tzLink, meta);
|
||||
}
|
||||
}
|
||||
} else if (id.equals("root")) {
|
||||
// supply TZDB short names if available
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user