From 8b6a387b19ed64df00e297d4a4b80562bb8f2812 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 18 May 2022 10:27:15 -0700 Subject: [PROPOSED] Go back to 2021e Morocco rearguard workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ziguard.awk: In rearguard format, go back to the 2021e approach for Morocco, which predicts perpetual DST after 2087-05-11, with TZ='XXX-2<+01>-1,0/0,J365/23'. Although perpetual DST may confuse rearguard clients for timestamps after 2087 we don’t know of any such clients, whereas we do know of problems with present-day timestamps computed via java.util.TimeZone.getDSTSavings https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html#getDSTSavings-- when implemented via com.android.i18n.timezone.ZoneInfoData.getLatestDstSavingsMillis https://android.googlesource.com/platform/external/icu/+/master/android_icu4j/libcore_bridge/src/java/com/android/i18n/timezone/ZoneInfoData.java#686 Problem reported by Almaz Mingaleev in: https://mm.icann.org/pipermail/tz/2022-March/031352.html https://mm.icann.org/pipermail/tz/2022-March/031356.html --- ziguard.awk | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ziguard.awk b/ziguard.awk index 6856a49..6888c27 100644 --- a/ziguard.awk +++ b/ziguard.awk @@ -104,23 +104,13 @@ DATAFORM != "main" { } if (!vanguard && $1 == "Rule" && $2 == "Morocco" && 2019 <= $3) { if ($9 == "0") { - # Add a day, to insert an extra transition to work around a bug - # in Android's DST offset finding logic circa 2022. See: - # https://mm.icann.org/pipermail/tz/2022-March/031352.html - # This does not affect the UTC offset, only the DST flag for that day. - last_std_date = $3 " " $6 " " ($7 + 1) " " $8 sub(/\t0\t/, "\t1:00\t") } else { sub(/\t-1:00\t/, "\t0\t") } } if (!vanguard && $1 == "1:00" && $2 == "Morocco" && $3 == "+01/+00") { - # This introduces a transition from 01:59:59 +00 to 03:00:00 +01 - # with both times being standard (i.e., a change to standard UT offset). - # This is rearguard's way to approximate the actual prediction, - # which is that of an ordinary transition from DST to standard time. - sub(/1:00\tMorocco\t\+01\/\+00$/, - "0:00\tMorocco\t+00/+01\t" last_std_date "\n\t\t\t 1:00\t-\t+01") + sub(/1:00\tMorocco\t\+01\/\+00$/, "0:00\tMorocco\t+00/+01") } } -- 2.34.1