Reputation: 41
I have a jvm running on a windows machine.It displays the current time (including time zone information) using TimeZone.getDefault(). I changed my operating system from Eastern Time (US & Canada) to Central Time (US & Canada) and the time zone the jvm displays does not change accordingly. When I restart the jvm, the time zone of the jvm is updated. Is there a way to get the most recent time zone info from the operating system without restarting the jvm?
Thanks.
Upvotes: 4
Views: 872
Reputation: 8359
As you highlighted by your test, system time zone changes are not taken into account by the JVM at runtime.
This is referenced as a bug and it is still open.
Upvotes: 4