Time Zone Issues with Java 1.4 on Windows

If your experiencing timezone problems with Java 1.4 on Windows, it may be due to this bug: #5033603, which was fixed in Java 1.5.
Basically when Java 1.4 looks up your timezone information to set the default timezone it looks in HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/TimeZoneInformation first instead of just HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/TimeZoneInformation. It is possible that ControlSet001 is not your current control set, which is where the problems come in. You will see the correct timezone info in Windows Control panel but Java will be using the incorrect time zone.
This entry in the java discussion forums has lots of info describing the issue.
So to solve the problem you can update the registry settings manually, or your can set the system property at startup by adding -Duser.timezone=America/New_York (or whatever your timezone is) to your VM Arguments.
Tweet
Trackbacks
Trackback Address: 171/448743B884599C7E9134F60B60077D10
Comments
On 09/26/2007 at 2:16:11 AM EDT Jens Balon wrote:
1
"So to solve the problem you can update the registry settings manually, or your can set the system property at startup by adding -Duser.timezone=America/New_York (or whatever your timezone is) to your VM Arguments."
I have a massive Problem with timezones in Java: Java shows only the GMT Time - the windowsXP-pro shows always the correct time (wester europe standard / western europe summertime - with mark on daylight savings). I checked tehe registry-entrys, but they are always the same - no matter if i looking to cs001, cs002 or ccs. You wrote, that i can fix this via startup-parameters. How? What should i use for my timezone? thank you.
Post a Comment
Recent Entries
- Howto Install and Run the Android Emulator
- jQuery UI Autocomple IE 6 Select List z-Index Issues
- Path Traversal Vulnerability Security Hotfix for ColdFusion Released
- Using AntiSamy with ColdFusion
- Writing Secure CFML Slides from CFUnited 2010
- Locking Down ColdFusion Presentation Slides
- Cross Domain Data Theft using CSS
- Using jQuery UI Autocomplete with Hidden ID's
I have a massive Problem with timezones in Java: Java shows only the GMT Time - the windowsXP-pro shows always the correct time (wester europe standard / western europe summertime - with mark on daylight savings). I checked tehe registry-entrys, but they are always the same - no matter if i looking to cs001, cs002 or ccs. You wrote, that i can fix this via startup-parameters. How? What should i use for my timezone? thank you.


add to del.icio.us




