• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating Time Zone when Windows Changes Time Zones

 
Jimmy Ho
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • 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.

Thanks,
Jimmy
 
Paul Clapham
Sheriff
Pie
Posts: 20719
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.

(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?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic