<div dir="ltr">My <a href="https://nodatime.org">Noda Time</a> library for .NET supports this as well.<div><br></div><div>See <a href="https://nodatime.org/3.0.x/userguide/tzdb">https://nodatime.org/3.0.x/userguide/tzdb</a> for more details, including a source code example.</div><div><br></div><div>Finally, java.time supports this too to some extent via <a href="https://docs.oracle.com/javase/10/docs/api/java/time/zone/ZoneRulesProvider.html">ZoneRulesProvider</a>, although there's a significant gap in terms of a public implementation that allows you to load data from a file or directory. (I suspect that sort of flexible implementation is present, but not public.) There may be third party implementations.</div><div><br></div><div>Jon</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 22 Feb 2021 at 18:12, Brian Park via tz <<a href="mailto:tz@iana.org">tz@iana.org</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"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for the info. I scanned through the Readme page, but I couldn't find the answer to my question: Does your library have the ability to set the underlying database to a specific TZDB version (e.g. 2019f, 2021a)?<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I would like this feature to get deterministic functional testing, instead of having the OS change the underlying TZDB version underneath me. The HowardHinnant C++ date library (<a href="https://github.com/HowardHinnant/date" target="_blank">https://github.com/HowardHinnant/date</a>) is the only library that I know that has this feature. I am looking for  a second library.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 22, 2021 at 9:32 AM Kerry Shetline via tz <<a href="mailto:tz@iana.org" target="_blank">tz@iana.org</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"><div><div>I’ve just finished an extensive update of a JavaScript/TypeScript date/time library that I’d previously used only for my own astronomy website, <a href="http://skyviewcafe.com" target="_blank">skyviewcafe.com</a>. I’ve done enough updates to this library now that it may be of interest to many other software developers, especially if they want to handle the odd edge cases that exist in timezone handling, like 47-hour days and missing days and the like. One unique features is that it's possible for users to get live updates of the tz database, which usually don’t become available to applications without, at the very least, restarting an application, if not rebooting one’s computer.</div><div><br></div><div>Libraries in this category are hardly unique, but one of the most popular libraries, Moment.js, is being phased out, so this seemed to be to be a good time to introduce a new one.</div><div><br></div><div>Among the (possible) unique features, you can do things like find the specific moments of DST transitions and other transitions, like UTC offset changes, and get descriptions of these changes, like this:</div><div><br></div><div><div><font face="Courier New"><span style="font-style:normal">new DateTime('2021-11-07', 'America/New_York').getDiscontinuityDuringDay() →</span></font></div><div><font face="Courier New"><span style="font-style:normal">{ start: '02:00:00', end: '01:00:00', delta: -3600000 } // fall back!</span></font></div><div><font face="Courier New"><span style="font-style:normal"><br></span></font></div><div><font face="Courier New"><span style="font-style:normal">// As soon as it’s midnight on the 30th, it’s instantly midnight on the 31st, erasing 24 hours:<br></span></font></div><div><font face="Courier New"><span style="font-style:normal">new DateTime('2011-12-30', 'Pacific/Apia').getDiscontinuityDuringDay()) →</span></font></div><div><font face="Courier New"><span style="font-style:normal">{ start: '00:00:00', end: '24:00:00', delta: 86400000 }</span></font></div><div><font face="Courier New"><span style="font-style:normal"><br></span></font></div><div><font face="Courier New"><span style="font-style:normal">// As soon as it’s midnight on the 31th, turn back to 1AM on the 30th, adding 23 hours to the day:<br></span></font></div><div><font face="Courier New"><span style="font-style:normal">new DateTime('1969-09-30', 'Pacific/Kwajalein').getDiscontinuityDuringDay() →</span></font></div><div><font face="Courier New"><span style="font-style:normal">{ start: '24:00:00', end: '01:00:00', delta: -82800000 }</span></font></div><div><br></div></div><div>My updated library can be found here: <a href="https://www.npmjs.com/package/@tubular/time" target="_blank">https://www.npmjs.com/package/@tubular/time</a></div><div><br></div><div>Besides the IANA timezone support, this library also features the ability to handle variable switch-over from the Julian to the Gregorian calendar, which can be of helpful to those handling historical dates.</div><div><br></div></div></blockquote></div>
</blockquote></div>