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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,60a1f757e0f7f8ea X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.174.74 with SMTP id s10mr1426450qaz.1.1343315117145; Thu, 26 Jul 2012 08:05:17 -0700 (PDT) Received: by 10.66.79.169 with SMTP id k9mr1614344pax.18.1343312722410; Thu, 26 Jul 2012 07:25:22 -0700 (PDT) Path: a15ni105485768qag.0!nntp.google.com!q21no17490431qas.0!news-out.google.com!p10ni64680744pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!feeder.erje.net!goblin1!goblin.stu.neva.ru!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: awdorrin Newsgroups: comp.lang.ada Subject: Re: Ada.Calendar Question Date: Fri, 20 Jul 2012 11:24:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <6eb75022-3376-400b-bdb5-d0150168f429@googlegroups.com> NNTP-Posting-Host: 192.31.106.34 Mime-Version: 1.0 X-Trace: posting.google.com 1342808646 12421 127.0.0.1 (20 Jul 2012 18:24:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 20 Jul 2012 18:24:06 +0000 (UTC) In-Reply-To: <6eb75022-3376-400b-bdb5-d0150168f429@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=192.31.106.34; posting-account=YkFdLgoAAADpWnfCBA6ZXMWTz2zHNd0j User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-07-20T11:24:05-07:00 List-Id: I finally realized that these nested packages are tagged private. Now it makes sense. It looks like the 'easiest' way for me to get from the stored 'seconds' and 'nanoseconds' is to do the following: procedure Example( sec : in Integer; nSec : in Integer) is T : Ada.Calendar.Time; begin T := Ada.Calendar.Conversions.To_Ada_Time(0) -- to get epoch + Ada.Calendar.Conversions.To_Duration( long(sec), long(nSec)); Put_Line( Ada.Calendar.Formatting.Image( Date => T, Include_Time_Fraction => True, Time_Zone => Ada.Calendar.Time_Zones.UTC_Time_Offset(T) ); end Example; The 'To_Duration' is a bit annoying, requiring withing the 'Interfaces.C' package for the 'long' type, but it does work fine.