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,FORGED_MUA_MOZILLA 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,ASCII-7-bit Received: by 10.224.177.12 with SMTP id bg12mr1437597qab.0.1343315510006; Thu, 26 Jul 2012 08:11:50 -0700 (PDT) Received: by 10.66.72.165 with SMTP id e5mr1630417pav.4.1343315412089; Thu, 26 Jul 2012 08:10:12 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no4160706qas.0!news-out.google.com!p10ni64989877pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newspump.sol.net!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!news.swapon.de!news.mixmin.net!eweka.nl!hq-usenetpeers.eweka.nl!newsfeed101.telia.com!starscream.dk.telia.net!bumblebee.dk.telia.net!not-for-mail Date: Tue, 24 Jul 2012 16:10:45 +0200 From: erlo User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Calendar and NTP (and Unix Epoch) References: <500dc548$0$2936$f40e02c5@shockwave.dk.telia.net> <18893cca-baa2-4930-bfb4-4c4f7eb7e983@googlegroups.com> <5s8s08lv6dj1i4tkb99roq9roifsgr44vd@invalid.netcom.com> <1e0fmpgo1d8ke.7gc1rzrv8v72.dlg@40tude.net> <6f28df4c-6b1a-46d1-a3b9-9ae41ea975a2@googlegroups.com> <4l5t6lhzgquo$.qa4ud3ssphtd.dlg@40tude.net> <4b3daad0-b884-4f42-9aa5-891bcfeadf87@googlegroups.com> <221dd619-09dd-4d62-9a42-f967471c3d12@googlegroups.com> In-Reply-To: Message-ID: <500eace5$0$2933$f40e02c5@soundwave.dk.telia.net> NNTP-Posting-Host: 62.198.148.244 X-Trace: 1343139045 soundwave.dk.telia.net 2933 62.198.148.244:51643 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-07-24T16:10:45+02:00 List-Id: On 07/24/2012 03:02 PM, Dmitry A. Kazakov wrote: > > Is it a standard Ada package? I guess it's a gnat-specific package - I can't find it in the RM. > >> into thinking that I can use To_Ada_Time to convert the NTP epoch base >> (1-1-1900 0:00) to a variable of type Time. > > Take some other base, e.g. 01.01.2010 00:00 [UTC, GMT, CET ...], if you > have an NTP reading of it. E.g. if NTP uses some astronomical year or other > method to calculate difference between two times. > I will try this approach. > You should not use Ada.Calendar without knowing exactly what time it > represents on the given machine. > >>> This presumes that they represent *same* time though maybe using different >>> epochs. You might need to read the UNIX and NTP documentation to learn what >>> exactly times they do represent. That would give you E2 - E1. To put it >>> simple: same time = synchronized clocks. >> >> This is the exact case. > > Which I doubt, but anyway. > > -- Regards Erlo