java incorrect timezone

前端 未结 9 1004
说谎
说谎 2020-12-06 02:07

I have an instance of Java which seems to be using a completely incorrect time zone. Instead of using the Australia/Sydney time zone which Windows is using, it is using the

9条回答
  •  时光取名叫无心
    2020-12-06 02:24

    In case time zones seem completely gone, at least in my case that Java 5 was used on a legacy system, make sure that the proper file exists in %JAVA_HOME%\jre\lib\zi folder. For instance, me, I couldn't make Europe/Athens work for the life of me. It turns out that the file %JAVA_HOME%\jre\lib\zi\Europe\Athens was missing (those directories that refer to continents were completely empty in the JDK I was using..) - did a comparison with a freshly downloaded JDK 1.5.0_22 from Oracle.

提交回复
热议问题