<div dir="ltr">There are APIs like TimeZone.getDSTSavings [1]. As of now we calculate it<div>as the difference between the last DST and standard offsets in the</div><div>transition table. As the last transition is marked as standard these offsets are</div><div>equal, and the method returns 0, which is wrong.</div><div><br></div><div>> would it be OK if the penultimate line were absent?</div><div>Removing the last transition would help. </div><div><div><br></div><div>[1] <a href="https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html#getDSTSavings--" target="_blank">https://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html#getDSTSavings--</a></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Mar 2022 at 18:33, Paul Eggert <<a href="mailto:eggert@cs.ucla.edu" target="_blank">eggert@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/28/22 09:03, Almaz Mingaleev wrote:<br>
> Unfortunately such standard-to-standard time transitions break<br>
> DST offset finding logic on Android (code is here [1]).<br>
<br>
Could you explain the problem more? There are lots of places where <br>
timezones switch from one standard time to another, and evidently these <br>
other transitions don't cause a problem. What's different here?<br>
<br>
Here's the output of 'zdump -i -c 2085,2100 Africa/Casablanca' if you're <br>
using rearguard format:<br>
<br>
> <br>
> TZ="Africa/Casablanca"<br>
> -     -       +01             1<br>
> 2085-04-22    02      +00<br>
> 2085-06-03    03      +01             1<br>
> 2086-04-14    02      +00<br>
> 2086-05-19    03      +01             1<br>
> 2087-03-30    02      +00<br>
> 2087-05-11    03      +01<br>
<br>
If we want the last line to be standard time, what should the previous <br>
lines look like if we want to avoid the Android transition-finding <br>
problem? For example, would it be OK if the penultimate line were absent?<br>
</blockquote></div>