Time zone updates

Time zones are a concept driven by the political situation in each country around the world. As such, they change frequently, and often at short notice. In order to manage this, Joda-Time uses global-tz which is derived from the standard IANA tz database. This is the same core data set used in most operating systems and the JDK itself.

Using JDK time zone data is a problem however, as the zones are only updated when the JDK is updated. This can cause issues if you are locked into an older version of the JDK.

Joda-Time also compiles the time zone data into our jar file. However, the key difference is that you can update the raw data and recompile the jar at any time.

Updating the time zone data

Firstly, download the latest version of the data files from global-tz. Ensure you select the "tzdata" download which comes as a tar.gz.

Secondly, you need a source code download of Joda-Time.

Thirdly, you must take the time zone data files from step one, and replace those in the Joda-Time download. They are located at {root}/src/main/java/org/joda/time/tz/src. Note that only some of the files need to be copied across.

Fourthly, change the version number in the pom.xml file to indicate that it is a non-standard release.

Finally, recompile the Joda-Time jar file using maven. Simply type mvn package in the root directory.

Back to top

Version: 2.12.7. Last Published: 2024-04-15.

Reflow Maven skin.