🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1191

Re: Probelem with Date and daylight savings

#1191
From: Hanan Hermon
Date: Thu, 25 Apr 2002 12:31
27 lines
1706 bytes
Thanks for your answer.

I found a way to disable the daylight savings by changing
the default TimeZone.

The problem is that I need to do it ONLY if the OS is not configured
to use daylight savings (Tested on WinNT).

Is there a Java API to check if the OS configuration ??

Thanks in advance,

R.F. Pels <ruurd@acklin.nl> wrote in message news:3cc6aff3_1@dnews...
> Hanan Hermon wrote:
>
> > I'm using the following code:
> >     System.out.println(""+new Date());
> >
> > Surprisingly the output is not correct. ( if the time is 10:00 then the
> > output is 11:00 ).
>
> Read the javadoc associated with java.util.Date. Try toLocaleString() and
> toGMTString() and see what happens.
>
> --
>
> Ruurd
Technical Details
Message-ID: <3cc7e91e_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!209.251.2.12.MISMATCH!news-xfer2.newshosting.com!newsfeed.icl.net!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3cc66f49_2@dnews> <3cc6aff3_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,78729ebe20306c09
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-04-25 04:38:49 PST
From: "Hanan Hermon" <hananh@radcom.co.il>
Newsgroups: borland.public.jbuilder.java.api
References: <3cc66f49_2@dnews> <3cc6aff3_1@dnews>
Subject: Re: Probelem with Date and daylight savings
Date: Thu, 25 Apr 2002 14:31:47 +0200
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 192.116.176.125
Message-ID: <3cc7e91e_2@dnews>
X-Trace: dnews 1019734302 192.116.176.125 (25 Apr 2002 04:31:42 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!209.251.2.12.MISMATCH!news-xfer2.newshosting.com!newsfeed.icl.net!out.nntp.be!propagator2-SanJose!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews