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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7dadb26e573572d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-10 04:27:26 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!skynet.be!news.mailgate.org!news-zh.switch.ch!switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!not-for-mail From: Thomas Wolf Newsgroups: comp.lang.ada Subject: Re: ada calendar Date: Wed, 10 Dec 2003 13:27:24 +0100 Organization: --- Message-ID: References: NNTP-Posting-Host: paraguard.paranor.ch Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: rex.ip-plus.net 1071059323 28067 193.246.248.114 (10 Dec 2003 12:28:43 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Wed, 10 Dec 2003 12:28:43 +0000 (UTC) X-Newsreader: MicroPlanet Gravity v2.60 Xref: archiver1.google.com comp.lang.ada:3305 Date: 2003-12-10T13:27:24+01:00 List-Id: rieachus@comcast.net wrote: > The latest version of the proposed additions for Ada 0Y can be found at: > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00351.TXT?rev=1.2> I see that this proposal includes some functionality for dealing with leap seconds. It proposes (among other things) procedure Difference (Left, Right : Time; Days : out Day_Count; Seconds : out Duration; Leap_Seconds : out Leap_Seconds_Count); Returns the difference between Left and Right. Days is the number of days of difference, Seconds is the remainder seconds of difference, and Leap_Seconds is the number of leap seconds. If Left < Right, then Seconds <= 0.0, Days <= 0, and Leap_Seconds <= 0. Otherwise, all values are non-negative. How is this supposed to work if Left or both Left and Right are in the future? You cannot predict when the next leap second will be inserted -- it depends on the irregularities of Earth's rotation, and IERS inserts a leap second whenever necessary (well, at the end of June or December) to keep the difference between UT1 und UTC < 0.9 sec. Also implementing this for past dates needs a look-up table. So, what is the number of leap seconds between 2004-01-01, 00:00:00 and 2105-01-01 00:00:00? Executing the proposed subprogram now would probably return Leap_Seconds = 0, but executing it in 20 years, it would probably have to return a non-zero value. (Because by then, IERS will most probably have inserted at least one additional leap second.) -- ----------------------------------------------------------------- Thomas Wolf e-mail: t_wolf@angelfire.com