Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Etc/GMT Timezone ?!?

807588Apr 1 2009 — edited Apr 2 2009
Hi All,

Thanks for taking the time to help.

JRE:
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

I live in Ireland so the locale on my machine is "Europe/London". However, on a process that I run, the default timezone comes back as "Etc/GMT". Now, first I thought that someone is setting the timezone somewhere to this but I cannot see anywhere in the code where this is happening. This timezone acts like "UTC" and so is bad for me since I am in Summer Time at the moment i.e. GMT + 1.

I have tried passing "-Duser.timezone=Europe/London" in the JVM params and it does not change things.

Using Joda Time, If I run:
	  final String defaultSystemTZ = new DateTime().getZone().getID();
I get "Etc/GMT" returned, even with the -Duser.timezone passed in as Europe/London.

The JAVA_HOME env variable is set correctly to : JAVA_HOME=C:\Program Files\Java\jdk1.6.0_12

Any ideas? I basically want the default time zone to be the correct one and not the fallback timezone of "Etc/GMT"...

thanks a lot.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2009
Added on Apr 1 2009
5 comments
1,425 views