[JSR310 M7 Review request] 8007572: Replace existing jdk timezone data at <java.home>/lib/zi with JSR310's tzdb.

Xueming Shen xueming.shen at oracle.com
Thu Feb 7 10:31:54 PST 2013


Hi,

8007572: Replace existing jdk timezone data at <java.home>/lib/zi with JSR310's tzdb.

Webrev:
http://cr.openjdk.java.net/~sherman/8007572/

Note:
JDK/JRE has been using the time zone data at <java.home>/lib/zi for
j.u.TimeZone since JDK 1.4.0 [1]. JSR310 has introduced in its own
time zone data file/format <java.home>lib/tzdb.jar to provide the time
zone data support for its new java.time date-time classes.

So we now have two different time zone data files in different formats
(though from the same time zone data source, Olson tz data, now the IANA
Time Zone Datebase) to support two sets of date-time APIs (java.util
date-time classes and java.time date-time classes) in one JDK/JRE, which
definitely will add the maintenance burden going forward, given the fact
that we will have to update/distribute the latest tzdb data in JDK/JRE
periodically [2].

Also the current way the time-zone data is being distributed/installed
(at <java.home>/lib.zi, as individual file for each time zone) has been
a footprint concern for some configurations, especially the small embedded
environment. The JEP151 [3] was originally submitted to propose to store
the time-zone data more efficiently into a single compressed file. The
JEP 151 has been withdrawn since, with the assumption that JDK 8 may
replace the "zi" data with the much smaller JSR310 tzdb data file.

As indicated in JEP151, current installed "zi" directory probably takes
up 1M of disk-space with the 0.5k default file-system-block-size. Even
with the proposed "store in one single compressed file" approach, it will
still take about 250K space for all tzdb data in "zi" directory. JSR310
tzdb data file however is much smaller. It is around 40K for compressed
and 100k uncompressed, for the same tz data.

The proposed change is to share the JSR310 time zone data tzdb.jar
with j.u.TimeZone by converting the JSR310 tzdb data completely (bits
to bits compatible) at runtime into the internal data structure that
j.u.TimeZone needs for its time zone data functionality/needs.

Thanks!
-Sherman

[1] https://jbs.oracle.com/bugs/browse/JDK-4230123
[2] http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html
[3] http://openjdk.java.net/jeps/151



More information about the build-infra-dev mailing list