[tz] OpenJDK/CLDR/ICU/Joda issues with Ireland change

Guy Harris guy at alum.mit.edu
Wed Jan 24 22:17:24 UTC 2018


On Jan 24, 2018, at 1:17 PM, Yoshito Umaoka <yoshito_umaoka at us.ibm.com> wrote:

> CLDR XML (or JSON) data is consumed by other projects such as ICU and Java, and these external projects know those offsets.
> CLDR only specifies daylight saving time name used for Europe/Dublin is "Irish Standard Time".
> ICU/Java imports zoneinfo from tz database, and obtain offset at a given time, then decide whether it's in standard time or daylight time.

The tz binary database has, for all transition times, an indication of whether, after the transition, you are in "DST".  If the tz binary database is what Java time zone code imports, it doesn't need to look at offsets to determine whether the times are standard or "DST", it can just use those values.  (I say "DST" because that's used to set tm_isdst.)

It does *not* contain any offsets other than, for each transition, what the offset from UTC is.  Thus, it provides no notion of "raw-offset" vs. "actual-offset", and you can't determine both a "raw-offset" and an "actual-offset" from the tz binary database without either 1) additional data or 2) some possibly-incorrect assumptions being made, such as "the only reason why an entry in the table of transitions has a different tt_gmtoff value is that the transition represents starting or ending DST" (that latter assumption has been false for a very very very very very long time for some tzdb regions, as a given region might switch from one time zone to another).

The tzdb *source* files, however, give the "standard" offset from UTC in zone lines and the "amount to save", to be added to the "standard" offset, in rule lines, so code that parses those files independently, rather than relying on the binary files produced by zic parsing the files, can get both the "standard" and "current" offset from UTC.

Which of those two things does the Java code that "imports zoneinfo from tz database do?  Does it read the binary data, or independently read the source data (or read binary data produced by a parser other than zic)?


More information about the tz mailing list