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=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b0734830bf2a1c0d,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Ada.Calendar.Formatting.Image Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1181776748 12.201.97.213 (Wed, 13 Jun 2007 23:19:08 GMT) NNTP-Posting-Date: Wed, 13 Jun 2007 23:19:08 GMT Organization: AT&T ASP.att.net Date: Wed, 13 Jun 2007 23:19:08 GMT Xref: g2news1.google.com comp.lang.ada:16182 Date: 2007-06-13T23:19:08+00:00 List-Id: Here's a little test program: with Ada.Calendar.Formatting; with Ada.Text_IO; procedure Time_Test is Time : constant Ada.Calendar.Time := Ada.Calendar.Clock; Year : Positive; Month : Positive; Day : Positive; Hour : Natural; Minute : Natural; Second : Natural; Sub_Sec : Duration; Seconds : Duration; begin -- Time_Test Ada.Calendar.Split (Date => Time, Year => Year, Month => Month, Day => Day, Seconds => Seconds); Ada.Calendar.Formatting.Split (Seconds => Seconds, Hour => Hour, Minute => Minute, Second => Second, Sub_Second => Sub_Sec); Ada.Text_IO.Put_Line (Item => Integer'Image (Year) & Integer'Image (Month) & Integer'Image (Day) & Integer'Image (Hour) & Integer'Image (Minute) & Integer'Image (Second) & Duration'Image (Sub_Sec) ); Ada.Text_IO.Put_Line (Item => Ada.Calendar.Formatting.Image (Time) ); end Time_Test; Using GNAT GPL 2007 on a Linux/x86 platform with system time set to MST (-0700), this outputs 2007 6 13 15 46 20 0.415945000 2007-06-13 22:45:57 Is the ~23 sec difference correct, or is this an error in Image? -- Jeff Carter "Sir Robin the-not-quite-so-brave-as-Sir-Lancelot, who had nearly fought the Dragon of Angnor, who nearly stood up to the vicious Chicken of Bristol, and who had personally wet himself at the Battle of Badon Hill." Monty Python & the Holy Grail 68