src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
changeset 55634 0f1e29c77e50
parent 50817 fa1e04811ff6
child 57667 79036e5e744b
equal deleted inserted replaced
55633:9d7c2d9f822c 55634:0f1e29c77e50
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   571                     // we don't have February cutoff in tzdata table yet)
   571                     // we don't have February cutoff in tzdata table yet)
   572                     // Ideally, if JSR310 can just pass in the nagative and
   572                     // Ideally, if JSR310 can just pass in the nagative and
   573                     // we can then pass in the dom = -1, dow > 0 into ZoneInfo
   573                     // we can then pass in the dom = -1, dow > 0 into ZoneInfo
   574                     //
   574                     //
   575                     // hacking, assume the >=24 is the result of ZRB optimization for
   575                     // hacking, assume the >=24 is the result of ZRB optimization for
   576                     // "last", it works for now.
   576                     // "last", it works for now. From tzdata2019a this hacking
   577                     if (dom < 0 || dom >= 24) {
   577                     // will not work for Asia/Gaza and Asia/Hebron which follow
       
   578                     // Palestine DST rules.
       
   579                     if (dom < 0 || dom >= 24 &&
       
   580                                    !(zoneId.equals("Asia/Gaza") ||
       
   581                                      zoneId.equals("Asia/Hebron"))) {
   578                         params[1] = -1;
   582                         params[1] = -1;
   579                         params[2] = toCalendarDOW[dow];
   583                         params[2] = toCalendarDOW[dow];
   580                     } else {
   584                     } else {
   581                         params[1] = dom;
   585                         params[1] = dom;
   582                         // To specify a day of week on or after an exact day of month,
   586                         // To specify a day of week on or after an exact day of month,