Blame SOURCES/jdk8274864-remove_amman_cairo_hacks.patch

ae37fd
commit 1b3825db8631e55771fb723d4fcd10040ea15b7e
ae37fd
Author: duke <duke@openjdk.org>
ae37fd
Date:   Wed Apr 12 17:25:27 2023 +0000
ae37fd
ae37fd
    Backport ec199072c5867624d66840238cc8828e16ae8da7
ae37fd
ae37fd
diff --git a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
ae37fd
index 6f6e190efcd..ef278203182 100644
ae37fd
--- a/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
ae37fd
+++ b/src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
ae37fd
@@ -608,34 +608,6 @@ public final class ZoneInfoFile {
ae37fd
                 params[8] = endRule.secondOfDay * 1000;
ae37fd
                 params[9] = toSTZTime[endRule.timeDefinition];
ae37fd
                 dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
ae37fd
-
ae37fd
-                // Note: known mismatching -> Asia/Amman
ae37fd
-                // ZoneInfo :      startDayOfWeek=5     <= Thursday
ae37fd
-                //                 startTime=86400000   <= 24 hours
ae37fd
-                // This:           startDayOfWeek=6
ae37fd
-                //                 startTime=0
ae37fd
-                // Similar workaround needs to be applied to Africa/Cairo and
ae37fd
-                // its endDayOfWeek and endTime
ae37fd
-                // Below is the workarounds, it probably slows down everyone a little
ae37fd
-                if (params[2] == 6 && params[3] == 0 &&
ae37fd
-                    (zoneId.equals("Asia/Amman"))) {
ae37fd
-                    params[2] = 5;
ae37fd
-                    params[3] = 86400000;
ae37fd
-                }
ae37fd
-                // Additional check for startDayOfWeek=6 and starTime=86400000
ae37fd
-                // is needed for Asia/Amman;
ae37fd
-                if (params[2] == 7 && params[3] == 0 &&
ae37fd
-                     (zoneId.equals("Asia/Amman"))) {
ae37fd
-                    params[2] = 6;        // Friday
ae37fd
-                    params[3] = 86400000; // 24h
ae37fd
-                }
ae37fd
-                //endDayOfWeek and endTime workaround
ae37fd
-                if (params[7] == 6 && params[8] == 0 &&
ae37fd
-                    (zoneId.equals("Africa/Cairo"))) {
ae37fd
-                    params[7] = 5;
ae37fd
-                    params[8] = 86400000;
ae37fd
-                }
ae37fd
-
ae37fd
             } else if (nTrans > 0) {  // only do this if there is something in table already
ae37fd
                 if (lastyear < LASTYEAR) {
ae37fd
                     // ZoneInfo has an ending entry for 2037
ae37fd
@@ -908,7 +880,6 @@ public final class ZoneInfoFile {
ae37fd
             this.dow = dowByte == 0 ? -1 : dowByte;
ae37fd
             this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600;
ae37fd
             this.timeDefinition = (data & (3 << 12)) >>> 12;
ae37fd
-
ae37fd
             this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900;
ae37fd
             this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800;
ae37fd
             this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800;