8255226: (tz) Upgrade time-zone data to tzdata2020d

Reviewed-by: naoto
This commit is contained in:
Kiran Sidhartha Ravikumar 2020-11-05 11:29:19 +00:00 committed by Sean Coffey
parent 2b78a43f77
commit b65ff60a8e
4 changed files with 59 additions and 23 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -573,8 +573,12 @@ public final class ZoneInfoFile {
// we can then pass in the dom = -1, dow > 0 into ZoneInfo
//
// hacking, assume the >=24 is the result of ZRB optimization for
// "last", it works for now.
if (dom < 0 || dom >= 24) {
// "last", it works for now. From tzdata2020d this hacking
// will not work for Asia/Gaza and Asia/Hebron which follow
// Palestine DST rules.
if (dom < 0 || dom >= 24 &&
!(zoneId.equals("Asia/Gaza") ||
zoneId.equals("Asia/Hebron"))) {
params[1] = -1;
params[2] = toCalendarDOW[dow];
} else {
@ -596,7 +600,9 @@ public final class ZoneInfoFile {
params[7] = 0;
} else {
// hacking: see comment above
if (dom < 0 || dom >= 24) {
if (dom < 0 || dom >= 24 &&
!(zoneId.equals("Asia/Gaza") ||
zoneId.equals("Asia/Hebron"))) {
params[6] = -1;
params[7] = toCalendarDOW[dow];
} else {