Java wrong time zone

I have an instance of Java that seems to use a completely incorrect time zone Instead of using the Australia / Sydney time zone that windows is using, it is using the America / Caracas time zone

I first check the windows time through the system clock, and then check HKEY_ LOCAL_ Machine / system / currentcontrolset / and controlset001, controlset002 All are set to Sydney time zone

Does anyone know whether this is an error in Java or a time set elsewhere?

The Java version is 1.6 0_ 06

Solution

Ensure that the time zone of the JVM is set when starting the application:

-Duser.timezone="Australia/Sydney"
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>