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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e2ba2bcbcb635510 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!API-DIGITAL.COM-a2kHrUvQQWlmc!not-for-mail Date: Sun, 13 Sep 2009 15:41:05 -0500 From: "Marc A. Criley" User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Dates and Times in GNAT on Linux References: <95e64$4aad119b$4a336034$30511@API-DIGITAL.COM> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <88c45$4aad58e2$4a336034$27115@API-DIGITAL.COM> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 88c454aad58e2ef96c59127115 Xref: g2news2.google.com comp.lang.ada:8314 Date: 2009-09-13T15:41:05-05:00 List-Id: Jeffrey R. Carter wrote: > Marc A. Criley wrote: >> >> I can then get the start of the Unix/UTC epoch via: >> UTC_Epoch_Start := Calendar.Time_Of(1970, 1, 1) >> + Duration(Calendar.Time_Zones.UTC_Offset * 60); >> -- For where I live, right now the UTC_Offset is -300 minutes, >> -- i.e. -5 hours. > > This is your problem. The offset on 1970 Jan 01 00:00:00.00 was -6 hrs. Yep. I'm retrieving the UTC_Offset in effect today (which is the default value of the UTC_Offset argument), not what it was at that date/time. Thanks! I knew I was missing something basic here. > Of course, any attempt to relate an Ada.Real_Time.Time to an > Ada.Calendar.Time is completely compiler dependent, is unlikely to work > with any other compiler, and could stop working with a different version > of the same compiler. Yep. But that's an issue I can deal with here. Marc