mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274864: Remove Amman/Cairo hacks in ZoneInfoFile
Reviewed-by: iris, joehw
This commit is contained in:
parent
ccbce107f2
commit
ec199072c5
1 changed files with 0 additions and 29 deletions
|
@ -618,34 +618,6 @@ public final class ZoneInfoFile {
|
||||||
params[8] = endRule.secondOfDay * 1000;
|
params[8] = endRule.secondOfDay * 1000;
|
||||||
params[9] = toSTZTime[endRule.timeDefinition];
|
params[9] = toSTZTime[endRule.timeDefinition];
|
||||||
dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
|
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 &&
|
|
||||||
(zoneId.equals("Africa/Cairo"))) {
|
|
||||||
params[7] = 5;
|
|
||||||
params[8] = 86400000;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (nTrans > 0) { // only do this if there is something in table already
|
} else if (nTrans > 0) { // only do this if there is something in table already
|
||||||
if (lastyear < LASTYEAR) {
|
if (lastyear < LASTYEAR) {
|
||||||
// ZoneInfo has an ending entry for 2037
|
// ZoneInfo has an ending entry for 2037
|
||||||
|
@ -918,7 +890,6 @@ public final class ZoneInfoFile {
|
||||||
this.dow = dowByte == 0 ? -1 : dowByte;
|
this.dow = dowByte == 0 ? -1 : dowByte;
|
||||||
this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600;
|
this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600;
|
||||||
this.timeDefinition = (data & (3 << 12)) >>> 12;
|
this.timeDefinition = (data & (3 << 12)) >>> 12;
|
||||||
|
|
||||||
this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900;
|
this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900;
|
||||||
this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800;
|
this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800;
|
||||||
this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800;
|
this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue