我使用AWS Elastic Beanstalk,并且每年playtform版本都会使用最新时区进行更新。今年,我注意到有些国家没有更新夏令时,因此我决定手动进行更新。
问题在于,使用最新的TZDB版本时,出现编译错误:
$ java -jar tzupdater.jar -v -l https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
Using https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz as source for tzdata bundle.
java.home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-0.43.amzn1.x86_64/jre
java.vendor: Oracle Corporation
java.version: 1.8.0_201
tzupdater version 2.2.0-b01
JRE tzdata version: tzdata2018c
Downloaded file to /tmp/tz.tmp/tzdata.tar.gz
tzupdater tool would update with tzdata version: tzdata2019a
Compiling TZDB version 2019a
Parsing file: /tmp/tz.tmp/africa
Parsing file: /tmp/tz.tmp/antarctica
Parsing file: /tmp/tz.tmp/asia
Failed: java.lang.Exception: Failed while parsing file '/tmp/tz.tmp/asia' on line 1860 'Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S'
java.lang.Exception: Failed while parsing file '/tmp/tz.tmp/asia' on line 1860 '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
如果没有编译,有人如何更新到最新版本?