<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Android currently doesn't support time stamps after 2038, right? So another approach would be a hack to add a table that works for current Android while still matching the desired behavior, by listing explicit transitions for each year through 2037. Something like the attached, say. (I have not tested or installed this patch and it won't be in 2018c; I'm floating it here just as an idea.) The advantage of this latter approach is that Android would agree with post-2018c tzdb behavior (including tm_isdst flags) for all time stamps that Android currently supports.</span></blockquote><div><br></div><div>I don't think we'll need anything that special, TBH. What we mostly need is consistency across the various open source projects we pull in. Android (at my level, at least) is an interesting study in combining / integrating lots of OS code. For historic releases we definitely had a bug WRT to negative DST [1] which would force our hand for releasing historic updates (much like Yoshito mentioned for ICU). Future facing, we are heavily reliant on ICU for formatting / strings so we probably keep the Android data / code consistent with their handling of the negative DST issue. I can't do much more testing to flush out other bugs unless I fabricate or get my hands on an ICU update with negative DST data.</div><div><br></div><div>My horizons generally extend as far as the Android platform APIs. Without making the changes and having a cycle of app compatibility testing I can't easily tell what assumptions apps developed for Android have made regarding the DST information we expose through our platform APIs. However, app developers can release new versions more readily than we can release platform versions. Those that are still actively supporting their software, that is.</div><div><br></div><div>I've put some info at the end about 2038 handling on Android if you're interested.</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">PS. Thanks for the details about some of the problems on the Android side; I now understand a bit better what you're up against.</span></blockquote><div class="gmail-yj6qo" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"></div><br class="gmail-Apple-interchange-newline">You're welcome.</div><div><br></div><div>Thanks again,</div><div><br></div><div>Neil.</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Regarding <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Android behavior for </span>time stamps after 2038: that depends on what APIs we're talking about. On the Java language side, there is certainly java.text.format.Time which handles 2037 (and other things) quite badly [2]. Most of the issues are burned into the API so I deprecated it a few releases ago.<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Although Android currently doesn't load transition data outside of the 32-bit range in its java.util.TimeZone implementation <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">it could be expanded </span>(it just takes the 32-bit transitions from our tzdata file, which is based on the zic output, so wider ranges are available). The java.util.TimeZone *APIs* should be fine from a 64-bit time perspective (even if they're a bit lacking in other respects). java.time and Android's version of ICU should also be fine: I have complete faith in their authors to have got the APIs and implementations correct from a 2038 perspective.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">I'm not actually 100% sure what the native API situation is for calls like mktime / localtime for native apps. Android uses code closely derived from tzcode, but for historic / unclear reasons time_t was allowed to be architecture dependent so last time I looked it was a 32-bit signed integer on 32-bit devices. That should become less of an issue as 32-bit devices disappear over time but probably affects plenty out there today. I'm mostly Java focused so this is outside my normal area. Things may have changed.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">[1] <a href="https://android-review.googlesource.com/#/c/platform/libcore/+/594073/">https://android-review.googlesource.com/#/c/platform/libcore/+/594073/</a></div><div>[2] <a href="https://developer.android.com/reference/android/text/format/Time.html">https://developer.android.com/reference/android/text/format/Time.html</a></div><div><br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Google UK Limited<br><br>Registered Office: 6 Pancras Square, London, N1C 4AG<br>Registered in England Number: 3977902</div></div></div></div></div>
</div></div>