Discover Azul's high-performance Java platform providing faster speed, startup, & efficiency without code changes
Support
Blog chevron_right Java

On Time with Timezones

Azul often gets asked how to apply newer time zone definitions to already installed JDKs. Up until now, the answers have been: (1) update your JDK to the latest revision, which will have newer timezone details inside, or (2) download and use tzupdater. Since the answer for (2) is free but not always attractive, Azul now provides an open source equivalent utility called ZIUpdater. This tool performs a subset of the functionality of tzupdater, though it upholds the core use case of applying IANA time zone definitions to installed JDKs. The current version of ZIUpdater works with Azul Zulu and Azul Zing, whether packaged as JDKs or as JREs, and also proves in our testing to be compatible with OpenJDK and Oracle JDK.

ZIUpdater provides a functional subset of the equivalent Oracle tool TZUpdater. The current version of ZIUpdater updates the zone information obtained from any downloaded copy of the IANA time zone database. ZIUpdater performs a compilation step, transforming the IANA database into a JDK-compatible file set, then applies it to the file tree of the invoked JDK/JRE. You may use ZIUpdater on any platform (Windows, Linux, Mac, etc.) where you have installed Java 8 or Java 7. By design it is a single JAR file and works with Zulu and Zing, but ZIUpdater has also been successfully tested against OpenJDK 8 and Oracle JDK 8. It also can forcefully apply older databases, and not only accepting just the newest one.

The Time Zone Database (often called tz or zoneinfo) contains code and data that represent the history of local time for many representative locations around the globe. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules.

The Time Zone Database is sometimes called the Olson database, referring to the founding contributor, Arthur David Olson, then at US National Institutes of Health, who cobbled it together with Paul Eggert, a computer scientist at the University of California, Los Angeles.

Stephen Colebourne captures nicely the impact of the original Olson database outage and associated legal case in his 2011 blog post. https://blog.joda.org/2011/10/today-time-zone-database-was-closed.html Thankfully the suit later got dismissed https://www.eff.org/cases/astrolabe-v-olson and now IANA maintains timezone database updates.

Why keep your time zone definitions up to date? It turns out both timezones and daylight saving times are politically driven, and subject to frequent changes as political tastes change in disparate areas across the globe. Jon Udell captures the flavor of the nuances of the rules that form historical time zone offsets here https://blog.jonudell.net/2009/10/23/a-literary-appreciation-of-the-olsonzoneinfotz-database/ with great examples of local times affecting Alaska, Portugal, and a tiny patch of the south coast of Australia. If your software serves a global audience, then you’d be wise to ensure your date calculations match the end user local experience, no matter where — or when — they are.

Download ZIUpdater from azul.com now!