[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Time zone data for OpenJDK 8



Le 08/08/2014 01:22, Emmanuel Bourg a écrit :

> 5. Implement a java.time.zone.ZoneRulesProvider [3] that reads the TZif2
> files installed by the tzdata package in /usr/share/zoneinfo. This would
> render the tzdata-java package obsolete in the long term. GNU ClassPath
> has a TZif2 parser [4] that could be used as a starting point.

It turns out that this solution will not work. Stephen Colebourne told
me that the ZoneRulesProvider is only used by the new java.time API and
not the old java.util.TimeZone class. Also, the tzbd.dat file contains
more data from the tzdb than the compiled zone files, so using the
system tz data may not fit the needs of the java.time API.

The new tzdb.dat file used by Java 8 is an internal file and there is no
guarantee its format will be the same in Java 9 or even during the Java
8 lifecycle. So installing the file in a Java 8 specific path as in
Fedora (/usr/share/javazi-1.8) is probably a good idea. And having the
compiler provided by openjdk-8 is more sensible than copying the sources
into the tzdata package. If ever the format of the file changes this
avoids an update of the tzdata package with the new compiler (but a new
upload to generate the new format would still be required).

So this leaves the options #3 and #4.

Emmanuel Bourg




Reply to: