java incorrect timezone

前端 未结 9 1020
说谎
说谎 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:25

    I had the same error, while I was setting my timezone to Malay Peninsula Standard Time, the JVM gave me Venezuela Time timezone.

    The following fix works for me:

    In the registry editor, edit your timezone to another timezone (I was trying to put another text like "Singapore Time". You can find the registry here:

    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/TimeZoneInformation

    And then, I reset it back to my desired timezone using Control Panel, Date and Time setting. When I check back to the registry editor, I can see it is reverted to Malay Peninsula Standard Time. And my JVM reads it correctly now...

提交回复
热议问题