From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9fbc059a74d74032 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-01 17:25:54 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!denver-snf1.gtei.net!news.gtei.net!coop.net!newsfeed1.global.lmco.com!newsfeed3.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: Paul Storm Newsgroups: comp.lang.ada Subject: Re: Leap Seconds Date: Thu, 31 May 2001 09:39:16 -0700 Organization: rse Message-ID: <3B1673B4.263CBC22@lmco.com> References: <9elpii$30i$1@nh.pace.co.uk> <3B0ED67B.E40A4E06@averstar.com><9f0ciq$itb$1@nh.pace.co.uk><9f2ue6$hcm$1@nh.pace.co.uk> <9f347i$jo1$1@nh.pace.co.uk> <9f5nr3$j6m$1@nh.pace.co.uk> NNTP-Posting-Host: 129.197.40.5 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (WinNT; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:8002 Date: 2001-05-31T09:39:16-07:00 List-Id: Marin David Condic wrote: > > Yeah - once you're talking just seconds, that's fine because you are now in > relative time WRT some epoch. However, once you go to calendar time, you've > got a problem. Consider that we agree to meet on March 1. If you count leap > years and I don't, won't we have a difference in what the number of days is > between now and March 1? So if your epoch is 1/6/80-00:00:00 and my epoch is > 1/1/96-00:00:00, how many seconds are between those to epochs? Won't it > matter if you count leap-seconds (leap-years?) or not? Naturally, being both > in the past, the conversion is a constant value. But what if I need to know > the seconds between either of those epochs and some date way in the future? > Unlike leap-years, leap-seconds are not predictable. > This is not precise. Leap seconds are well defined. You CAN calculate a leap second for any specific future time. It is theoretically possible that there may never be any more leap seconds promulgated. (not likely, I'll admit) In which case the current list of established leap seconds are known. At any given run time of the program the leap seconds are(or will be) defined and established. Hence you can calculate for any future times in systems applicable to leap seconds. Furthermore you can determine what leap seconds were applicable for any (previous) execution of the program. Designing your application to look up the leap second constants at run time is certainly possible. The rest is commentary on how to code it. Regards.