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=0.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, FORGED_GMAIL_RCVD,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,59c3b3f9911c9191 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.224.177.12 with SMTP id bg12mr1510771qab.0.1343317591907; Thu, 26 Jul 2012 08:46:31 -0700 (PDT) Received: by 10.66.89.196 with SMTP id bq4mr1814303pab.26.1343316063630; Thu, 26 Jul 2012 08:21:03 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no8402011qas.0!news-out.google.com!p10ni64993560pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!border6.newsrouter.astraweb.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!nuzba.szn.dk!pnx.dk!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Vasiliy Molostov" Newsgroups: comp.lang.ada Subject: Re: Ada.Calendar and NTP (and Unix Epoch) Date: Tue, 24 Jul 2012 23:43:49 +0400 Organization: None Message-ID: References: <500dc548$0$2936$f40e02c5@shockwave.dk.telia.net> <18893cca-baa2-4930-bfb4-4c4f7eb7e983@googlegroups.com> <60c9c92b-280b-4178-a410-2bc8756c6b5e@googlegroups.com> <5513b36d-560f-42ee-b6b6-bdb456097780@googlegroups.com> NNTP-Posting-Host: Xw13RWgh8yxgPSv0x3+H9w.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.00 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-07-24T23:43:49+04:00 List-Id: Dmitry A. Kazakov =D0=BF=D0=B8=D1=81=D0=B0=D0= =BB(=D0=B0) =D0=B2 =D1=81=D0=B2=D0=BE=D1=91=D0=BC =D0=BF=D0=B8=D1=81=D1=8C= =D0=BC=D0=B5 Tue, = 24 Jul 2012 22:28:27 +0400: > Furthermore, operations like UTC_Time_Offset, Time_Of, Split for some > distant time in the past, e.g. 1901 are most likely wrong, because = > OS/Ada's > RTL cannot keep track of all political changes of all time zones in or= der > to be able to evaluate the number of seconds from present time to 1901= in > the time zone. It is *not* the number of years multiplied by the year'= s > duration. (IANA Time Zone Database or alike is required for that) > > Calculating future times is absolutely impossible because that depends= on > future decisions of the corresponding governmental bodies having the > authority over the time zone, from daylight saving time to changing th= e > whole zone. I took a look at = http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0119-1.txt And I can say that there is a mis .... "misviewving" of the Time, UTC ti= me = and Zoned Time (political) While typical application takes time from some sort of monotonic time = source (e.g. clock), which is supposed to be one and authoritative for = such application, it is in the same moment this application also deals = with time representation, and a "political" time (zoned) is one of such = = representations. Probably and personally, I don't prefer to convert between representatio= ns = and catch one or two hour diffs, instead I prefer to do calculations = better done with monotonic time, and then convert result to the required= = representation. Converting from some representation into authoritative monotonic time is= = "mission impossibe", since important data may be lost, because this = important data belongs entirely to the representation, and can not be = expressed in monotonic authoritative source. Things like "ada.calendar is a fake" are just based on "speculative = cone-moving" between "time real value" and "time representation". > > This is why it is better not to touch Ada.Calendar.Time. > > Ada.Real_Time, Duration, Time_Span, some numeric type would be much = > better > candidates. > -- = =D0=9D=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE =D0=B2 =D0=BF=D0=BE=D1=87= =D1=82=D0=BE=D0=B2=D0=BE=D0=BC =D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B5= =D0=B1=D1=80=D0=B0=D1=83=D0=B7=D0=B5=D1=80=D0=B0 Opera: http://www.oper= a.com/mail/