Article View: borland.public.jbuilder.java.language
Article #18578Re: System time
From: soklay
Date: Mon, 25 May 1998 00:00
Date: Mon, 25 May 1998 00:00
32 lines
1791 bytes
1791 bytes
I have checked the regional settings in the control panel to set the
"daylight savings time". However, the checkbox is only enabled when I select
timezone within GMT-3.30 and GMT+3.30. Anything outside that, the checkbox
would be disable.
I tested System.currentTimeMillis() with timezone GMT+3.30 ("Daylight
Savings Time" checked), it gives me the correct time. However, with GMT+8
("Daylight Savings Time" disabled), it gives me GMT+1 which is 7 hours
behind the local time.
Is this what you referred as misconfiguration of local hardware that the
"Daylight Savings Time" checkbox is disabled for timezone outside GMT-3.3
and GMT+3.3, or is it norm?
Any ideas?
Neo S.L.
ICOST Systems Pte Ltd
Jeffrey I. Schiller wrote:
> System.getCurrentTimeMillis() is defined to return UTC (GMT). How you
> obtain local time depends on which version of the JDK you are coding to.
> For 1.0 you use the Date object. For 1.1 you make use of the Date,
> Calendar and DateFormat objects/classes.
>
> I don't know why you are getting GMT+1, but I suspect either a bug or a
> misconfiguration of your local hardware (probably having to do with
> "Daylight Savings Time" or "Summertime".
>
> -Jeff
Technical Details
Message-ID:
<3569110E.1C4A092C@singnet.com.sg>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6jirrf$haf5@forums.borland.com> <6jqo1a$mmp@bgtnsc02.worldnet.att.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,57190fe372fb50d6 X-Google-Attributes: gidf74b3,public From: soklay <icost@singnet.com.sg> Subject: Re: System time Date: 1998/05/25 Message-ID: <3569110E.1C4A092C@singnet.com.sg> X-Deja-AN: 356252399 Content-Transfer-Encoding: 7bit References: <6jirrf$haf5@forums.borland.com> <6jqo1a$mmp@bgtnsc02.worldnet.att.net> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language