4

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.

1

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

That bug is marked as won't fix without explanation - any idea why?
@AntonDuzenko, the bug is 22 years old. Yep, they probably won't fix it. Maybe the idea of an event driven workaround has been implemented. I am outdated on the evolutions of Java anyway...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.