Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed1.swip.net!newsfeed2.funet.fi!newsfeeds.funet.fi!feeder1.news.elisa.fi!uutiset.elisa.fi!7564ea0f!not-for-mail From: Jukka Lahtinen Newsgroups: comp.lang.java.programmer Subject: Re: Searching for a "TimeInterval" type... Organization: N/A References: <524b607c$0$294$14726298@news.sunsite.dk> X-no-archive: yes Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:TqSb4ZFfVWz68r/yQDvCRsyoB9E= MIME-Version: 1.0 Content-Type: text/plain Lines: 28 Date: Thu, 03 Oct 2013 17:18:18 +0300 NNTP-Posting-Host: 91.155.88.191 X-Complaints-To: newsmaster@saunalahti.com X-Trace: uutiset.elisa.fi 1380809898 91.155.88.191 (Thu, 03 Oct 2013 17:18:18 EEST) NNTP-Posting-Date: Thu, 03 Oct 2013 17:18:18 EEST Xref: csiph.com comp.lang.java.programmer:25452 Andreas Leitgeb writes: > Jukka Lahtinen wrote: >> Andreas Leitgeb writes: >>> Some example interval of what I'm going to deal with can be >>> described as "tomorrow one (wall-clock)hour earlier". This just >>> isn't the same as in "23 hours" (nor as "82800 seconds"). >> What will that be when called between midnight and 01:00? > It would be the same day between 23:00 and midnight, even if the > day itself is a DST-switch-day. In that case it isn't tomorrow, so "tomorrow one (wall-clock)hour earlier" is a bit misleading 1 hour in every 24. That is over 4% of time. > The other question: what that would be "one day minus one hour" after > a timestamp between 3am and 4am of the saturday before Spring DST day? > Answer: I don't care. That would be a weekend, and I happen not to care > about weekends for my task ;-) Logically it would probably skip one hour in Spring and use one hour twice in Fall, when called near the time of the change. And the other way round when the result would be near the time of the change. (Or is it the other way round..) And apparently this doesn't matter. -- Jukka Lahtinen