Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » TimeZone.getDefault() returns GMT
TimeZone.getDefault() returns GMT [message #482293] Wed, 26 August 2009 06:49 Go to next message
Hans is currently offline HansFriend
Messages: 36
Registered: July 2009
Member
On Windows XP SP3 OS Timezone is set to Switzerland i.e. Amsterdam,
Berlin, Bern, etc. But either JVM 1.6.0_14 from SUN or 1.6.0 from IBM
returns default Timezone GMT instead of Europe/Zurich!

This causes subversion checkin times to be 2 hours behind, now during
summertime and Calendar Entries within the Eclipse based Lotus Notes 8.5
are shown to hours earlier. This is no contradiction, in both cases the
local time is calculated back to GMT!

I changed the OS setting to New York time and got the displays changed as
expected. But changing back to local time display was wrong again, as if
the JVM's consider local time must be adjusted to GMT!

It may be a problem of XP running now for more than 5 Years without new
installation!
I need to know how I can force the JVM Default TimeZone to Europe/Zurich
on Windos start up for both JVM's.

I tried to force the timezone setting on start up within eclipse.ini with
-Duser.timezone=Europe/Zurich, but without any effect within eclispe 3.5
and the notes RCP startup is even more hidden such I didn't find where a
force could be put in!

Do any body has a hint how to solve this nasty issue?

Thanks in advance
Re: TimeZone.getDefault() returns GMT [message #482527 is a reply to message #482293] Wed, 26 August 2009 21:44 Go to previous messageGo to next message
Eric Jain is currently offline Eric JainFriend
Messages: 266
Registered: July 2009
Senior Member
Hans wrote:
> I tried to force the timezone setting on start up within eclipse.ini with
> -Duser.timezone=Europe/Zurich, but without any effect within eclispe 3.5
> and the notes RCP startup is even more hidden such I didn't find where a
> force could be put in!

I assume this is a general issue with Java on your machine? Have you tried
running a simple example that prints TimeZone.getDefault() from the
command line? I have a six year old Windows XP installation, and Java
(recently upgraded from Sun 1.6.0_13 to 1.6.0_16) has always picked up the
local time zone without any special configuration.
Re: TimeZone.getDefault() returns GMT [message #482656 is a reply to message #482527] Thu, 27 August 2009 12:57 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Eric Jain wrote:
> Hans wrote:
>> I tried to force the timezone setting on start up within eclipse.ini
>> with -Duser.timezone=Europe/Zurich, but without any effect within
>> eclispe 3.5 and the notes RCP startup is even more hidden such I
>> didn't find where a force could be put in!
>
> I assume this is a general issue with Java on your machine? Have you
> tried running a simple example that prints TimeZone.getDefault() from
> the command line? I have a six year old Windows XP installation, and
> Java (recently upgraded from Sun 1.6.0_13 to 1.6.0_16) has always
> picked up the local time zone without any special configuration.
>
Same here: I'm in the Europe/Berlin zone with Windows XP SP3 plus JRE
6.0_16 and it works as expected.

Dani
Re: TimeZone.getDefault() returns GMT [message #482674 is a reply to message #482527] Thu, 27 August 2009 14:02 Go to previous message
Hans is currently offline HansFriend
Messages: 36
Registered: July 2009
Member
Eric Jain wrote:

> Hans wrote:
>> I tried to force the timezone setting on start up within eclipse.ini with
>> -Duser.timezone=Europe/Zurich, but without any effect within eclispe 3.5
>> and the notes RCP startup is even more hidden such I didn't find where a
>> force could be put in!

> I assume this is a general issue with Java on your machine? Have you tried
> running a simple example that prints TimeZone.getDefault() from the
> command line? I have a six year old Windows XP installation, and Java
> (recently upgraded from Sun 1.6.0_13 to 1.6.0_16) has always picked up the
> local time zone without any special configuration.
Yes I did before, TimeZone.getDefault() returns GMT! Though by the windows
settings it should at least return GMT-1! I changed windows to New York
Time and back after restart too. -> No change!

Still searching how to fix it without reinstall windows.
Previous Topic:Setting Cursor Position in TextEditor
Next Topic:Get workbench part instance.
Goto Forum:
  


Current Time: Fri Apr 26 08:31:57 GMT 2024

Powered by FUDForum. Page generated in 0.03287 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top