Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

java - Error updating tzdata 2018f (Released 2018-10-18) with tzupdater-2.2.0

I'm trying to update JVM's Time Zone info using TZUpdater 2.2.0.

> [root@local tzupdater-2.2.0]# java -jar tzupdater.jar -V
  tzupdater version 2.2.0-b01
  JRE tzdata version: tzdata2018d
  tzupdater tool would update with tzdata version: tzdata2018f

So, I'm running the command below:

> [root@local tzupdater-2.2.0]# java -jar tzupdater.jar -l

However, I'm getting this error message:

Failed: java.lang.Exception: Failed while parsing file '/tmp/tz.tmp_1/asia' on line 1655 'Rule  Japan   1948    1951    -   Sep Sat>=8  25:000S'
java.lang.Exception: Failed while parsing file '/tmp/tz.tmp_1/asia' on line 1655 'Rule  Japan   1948    1951    -   Sep Sat>=8  25:00   0   S'
    at tools.tzdb.TzdbZoneRulesCompiler.parseFile(TzdbZoneRulesCompiler.java:377)
    at tools.tzdb.TzdbZoneRulesCompiler.compile(TzdbZoneRulesCompiler.java:191)
    at tools.tzdb.TzdbZoneRulesCompiler.<init>(TzdbZoneRulesCompiler.java:307)
    at com.sun.tools.tzupdater.ExternalModule.compileToJSRBinary(ExternalModule.java:153)
    at com.sun.tools.tzupdater.TimezoneUpdater.run(TimezoneUpdater.java:230)
    at com.sun.tools.tzupdater.TimezoneUpdater.main(TimezoneUpdater.java:634)
Caused by: tools.tzdb.DateTimeException: Invalid value for SecondOfDay value: 90000
    at tools.tzdb.ChronoField.checkValidValue(ChronoField.java:173)
    at tools.tzdb.LocalTime.ofSecondOfDay(LocalTime.java:210)
    at tools.tzdb.TzdbZoneRulesCompiler.parseMonthDayTime(TzdbZoneRulesCompiler.java:475)
    at tools.tzdb.TzdbZoneRulesCompiler.parseRuleLine(TzdbZoneRulesCompiler.java:399)
    at tools.tzdb.TzdbZoneRulesCompiler.parseFile(TzdbZoneRulesCompiler.java:354)
    ... 5 more

I'm using https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz as the source for the tzdata bundle.

Edited - In addition, I'm using either Java(TM) SE Runtime Environment (build 1.8.0_66-b17) and OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-1~deb9u1-b13), meanwhile I have same reported problem using TZUpdater or ZIUpdater

Can anyone help me about this issue? Any comment will be appreciated.

Many thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, the rules for Japan in 1948-1951 changed in 2018f in an "interesting" way: officially, Japan's fall back occurred at 25:00 on Saturday, instead of 01:00 on the Sunday. That confused the Java time zone updater, as well as my own Noda Time project.

There's now a commit to avoid 25:00 in the "rearguard" format - the rearguard format is basically more conservative, avoiding things like Ireland's negative DST.

I would expect a 2018g release at some point reasonably soon, to include that fix. Assuming the tzupdater tool uses the rearguard appropriately, I'd expect that to sort things out. If you can possibly wait until then, I'd do so. Otherwise, use the -l flag on tzupdater to specify a different data source, e.g. for 2018e: https://data.iana.org/time-zones/releases/tzdata2018e.tar.gz


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...