Thursday, April 15, 2010

Windows 7 and Java JDK 1.6 Timezone issue

Same piece of Java program running on Windows 7 and JDK 1.6, the date time related routine returns TIME ZONE :Greenwich Mean Time, which is wrong.

Insteads of going into source code level to add in timezome "GMT+8" routine, we can alter the timezone properties at command line level.

java -Duser.timezone="GMT+8" .....
or
java -Duser.timezone="Asia/Singapore" .....


Reference:
http://bugs.sun.com/view_bug.do?bug_id=6456628

4 comments:

R. Fierro, II said...

Thank you so much for documenting this! Unfortunately, your referenced Java bug URL is no longer valid, and a search at the Oracle SDN Bug Database (http://bugs.sun.com/bugdatabase/) didn't provide anything on your find. Great job!!

oraclesoon said...

After Sun was acquired by Oracle, many old good information in Sun had disappeared. This is truely very sad.

Anonymous said...

Here are some related bugs:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4085143
or
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6362432
or
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4059431

eSeal said...

Thank u.

Oracle Applications