After a few weeks of intense rewrites and tests I am finally proud to release TZDB 2.0 (2019b) released.

:warning: This is a breaking release. You might need to fix your code after the update.

  • TBudledTimeZone no longer derives from TTimeZone on Delphi. This has finally freed me from having to implement crooked functionality that fits into the Delphi model. Also resulted in much needed simplification of the code base.
  • Implementation now uses generic classes on both Delphi and FreePascal. This should ensure compatibility with future version of Delphi. As a result, I have dropped support for versions of Delphi pre-XP. Minimum supported FreePascal version is 3.0.
  • Rewrote internals to use year segments for all operations. A year is now being split internally into distinct time segments. Each operation now only has to find the segment that describes a time and then use its meta-data. Before this change, each operation would have its own quirks and implementation details.
  • GetYearBreakdown allows pulling all time segments for a given year. No more looping by second required!
  • New DbVersion property allows checking the IANA DB version.
  • General fixes for exotic time zones such as Cairo in 1900, 2010, 2012 and 2014.
  • Fixes for zones with negative DST offsets such as Dublin.
  • … and more fixes!
  • Added special build script that allowed me to combine the three files into TZDB.pas file that is available in the /dist/TZDB.pas path in root. Simply drop that unit into your project and you’re good to go!

This concludes my TZDB “intervention” for a while. I think the current version is quite good and should do its job well into next years.

The latest source code is available here.