0
We changed the entry time of summer time 2018 on the Operating System (Linux or Windows), but the JAVA application shows the wrong time (daylight saving time).
0
We changed the entry time of summer time 2018 on the Operating System (Linux or Windows), but the JAVA application shows the wrong time (daylight saving time).
3
We found that JAVA has its own Daylight Saving Time (DST) and that it is necessary to update the configuration due to default changes.
Execute the command below (specify the full path)
export JAVA_HOME=caminho do java
java -jar tzupdater.jar -f -l file:///home/USER/Downloads/tzdata-latest.tar.gz
If the error occurs, simply unzip the tzdata file, comment on the file line and resume compressing the TZDATA.
Using file:///home/USER/Downloads/tzdata-latest.tar.gz as source for tzdata bundle.
Failed: java.lang.Exception: Failed while parsing file '/tmp/tz.tmp_6/asia' on line 1655 'Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S'
java.lang.Exception: Failed while parsing file '/tmp/tz.tmp_6/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
Standard output
java -jar tzupdater.jar -f -l file:///home/USER/Downloads/tzupdater-2.2.0/tzdata/tzdata.tar.gz
Using file:///home/USER/Downloads/tzupdater-2.2.0/tzdata/tzdata.tar.gz as source for tzdata bundle.
Create directory /tmp/jtzu
, copy file to folder and uncompress file
mkdir /tmp/jtzu
cd /tmp/jtzu
scp jtzu-1.7.18e.zip /tmp/jtzu
unzip jtzu-1.7.18e.zip
Change the file runjtzuenv.sh
, setando NOGUI
to disable the graphical interface
NOGUI=true
Run the file to perform Vms Discovery
bash runjtzu.sh
The previous command generates the file SDKList.txt
with all Java installations found.
Change the file runjtzuenv.sh
NOGUI=true
DISCOVERONLY=false
SILENTPATCH=false
Run the file again
bash runjtzu.sh
I created a repository with the above-mentioned fix already compressed: https://github.com/psybox/tzdata_temer
Browser other questions tagged java timezone
You are not signed in. Login or sign up in order to post.
Java keeps this information within the JVM itself, separate from the operating system. To update, you can use the Tzupdater Tool: https://www.oracle.com/technetwork/java/javase/documentation/tzupdater-readme-136440.html
– hkotsubo