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