• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Updating Time Zone when Windows Changes Time Zones

Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I've noticed that if I go onto my Windows machine and change the time zone, the time zone returned by my Java application (which has been running this whole time) returns the prior time zone. I have to restart the Java application for the change to take effect.

Is there any way to have the JRE/Java re-load the time zone information from the Windows operating system without having to restart my JRE?

FYI, I'm on JDK 1.5_17, and the servers I run it on use mostly Windows 2000, though I've noticed this happens on Windows XP as well.

Posts: 27365
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

(It's more efficient for the JVM to just get the time zone when it starts up. The probability that the time zone will change while the application is running is so tiny, it's not worth the cost of getting it every single time the default time zone is required. You weren't planning on making a habit of changing your machine's time zone, were you?)
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic