• 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 ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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.

Thanks,
Jimmy
 
Sheriff
Posts: 27234
87
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
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?)
 
reply
    Bookmark Topic Watch Topic
  • New Topic