🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java
Article #591

Re: java.util.TimerTask DST problem

#591
From: Skinnybrown
Date: Sat, 14 Dec 2002 10:05
45 lines
2454 bytes
I don't know if there is a better way of doing it, but could you not stop
the TimerTask, adjust the time, then re-start it?

Skinnybrown

-----

What I lack in skill, I make up for in inability


"Dahl" <NOSPAMjimmichr@hotmail.comSPAMNO> wrote in message
news:aim5di$2mo5$1@news.cybercity.dk...
> Sorry about the danish in the beginning of the post. Please ignore the
first
> two lines (o:
>
> "Dahl" <NOSPAMjimmichr@hotmail.comSPAMNO> wrote in message
> news:aim52n$2lvs$1@news.cybercity.dk...
> > HEjsa jeg har postet nedenst�ende sp�rgsm�l p� suns board, men ikke f�et
> > nogen svar. Derfor pr�ver jeg her.
> >
> > I'm using java.util.Timer to execute a java.util.TimerTask at a fixed
rate
> > (5 min). It works fine until I simulate daylight saving time.
> >
> > When I increment the computers time by 1 hour, the TimerTask is executed
> > many times right after each other (probably 60/5 times).
> >
> > When the time is set back one hour the task is executed after 65
minutes.
> >
> > I want the task to be executed every 5 minutes, even if the computer
time
> is
> > changed due to DST.
> >
> > Is that possible?
> >
> > Thanks
> > Dahl
> >
> >
> >
>
>
Technical Details
Message-ID: <atevoc$ndq$3@venus.btinternet.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!newsfeed.mathworks.com!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
References: <aim52n$2lvs$1@news.cybercity.dk> <aim5di$2mo5$1@news.cybercity.dk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f9a23,180186fa186d9925
X-Google-Attributes: gidf9a23,public
X-Google-Thread: f5d71,180186fa186d9925
X-Google-Attributes: gidf5d71,public
X-Google-ArrivalTime: 2002-12-14 02:05:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!newsfeed.mathworks.com!btnet-peer0!btnet-feed5!btnet!news.btopenworld.com!not-for-mail
From: "Skinnybrown" <Lancroad@btopenworld.com>
Newsgroups: comp.lang.java,dk.edb.programmering.java
Subject: Re: java.util.TimerTask DST problem
Date: Sat, 14 Dec 2002 10:05:01 +0000 (UTC)
Organization: BT Openworld
Lines: 47
Message-ID: <atevoc$ndq$3@venus.btinternet.com>
References: <aim52n$2lvs$1@news.cybercity.dk> <aim5di$2mo5$1@news.cybercity.dk>
NNTP-Posting-Host: host213-122-132-139.in-addr.btopenworld.com
X-Trace: venus.btinternet.com 1039860301 23994 213.122.132.139 (14 Dec 2002 10:05:01 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Sat, 14 Dec 2002 10:05:01 +0000 (UTC)
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000