< prev index next >

src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java

Print this page

        

*** 571,586 **** // we don't have February cutoff in tzdata table yet) // Ideally, if JSR310 can just pass in the nagative and // 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. From tzdata2019a 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 { params[1] = dom; // To specify a day of week on or after an exact day of month, --- 571,582 ---- // we don't have February cutoff in tzdata table yet) // Ideally, if JSR310 can just pass in the nagative and // 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) { params[1] = -1; params[2] = toCalendarDOW[dow]; } else { params[1] = dom; // To specify a day of week on or after an exact day of month,
*** 611,642 **** params[8] = endRule.secondOfDay * 1000; params[9] = toSTZTime[endRule.timeDefinition]; dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000; // Note: known mismatching -> Asia/Amman - // Asia/Gaza - // Asia/Hebron // ZoneInfo : startDayOfWeek=5 <= Thursday // startTime=86400000 <= 24 hours // This: startDayOfWeek=6 // startTime=0 // Similar workaround needs to be applied to Africa/Cairo and // its endDayOfWeek and endTime // Below is the workarounds, it probably slows down everyone a little if (params[2] == 6 && params[3] == 0 && ! (zoneId.equals("Asia/Amman") || ! zoneId.equals("Asia/Gaza") || ! zoneId.equals("Asia/Hebron"))) { params[2] = 5; params[3] = 86400000; } // Additional check for startDayOfWeek=6 and starTime=86400000 ! // is needed for Asia/Amman; Asia/Gasa and Asia/Hebron if (params[2] == 7 && params[3] == 0 && ! (zoneId.equals("Asia/Amman") || ! zoneId.equals("Asia/Gaza") || ! zoneId.equals("Asia/Hebron"))) { params[2] = 6; // Friday params[3] = 86400000; // 24h } //endDayOfWeek and endTime workaround if (params[7] == 6 && params[8] == 0 && --- 607,632 ---- params[8] = endRule.secondOfDay * 1000; params[9] = toSTZTime[endRule.timeDefinition]; dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000; // Note: known mismatching -> Asia/Amman // ZoneInfo : startDayOfWeek=5 <= Thursday // startTime=86400000 <= 24 hours // This: startDayOfWeek=6 // startTime=0 // Similar workaround needs to be applied to Africa/Cairo and // its endDayOfWeek and endTime // Below is the workarounds, it probably slows down everyone a little if (params[2] == 6 && params[3] == 0 && ! (zoneId.equals("Asia/Amman"))) { params[2] = 5; params[3] = 86400000; } // Additional check for startDayOfWeek=6 and starTime=86400000 ! // is needed for Asia/Amman; if (params[2] == 7 && params[3] == 0 && ! (zoneId.equals("Asia/Amman"))) { params[2] = 6; // Friday params[3] = 86400000; // 24h } //endDayOfWeek and endTime workaround if (params[7] == 6 && params[8] == 0 &&
< prev index next >