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!news4.google.com!feeder.news-service.com!weretis.net!feeder2.news.weretis.net!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Dates and Times in GNAT on Linux Date: Sun, 13 Sep 2009 12:35:37 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <95e64$4aad119b$4a336034$30511@API-DIGITAL.COM> NNTP-Posting-Host: 467a9080b965c1413461f3b17807a52e Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 487999dda18fa4295779bae76b22bc7e X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <95e64$4aad119b$4a336034$30511@API-DIGITAL.COM> X-Validate-Post: http://news.tornevall.net/validate.php?trace=487999dda18fa4295779bae76b22bc7e X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news2.google.com comp.lang.ada:8313 Date: 2009-09-13T12:35:37-07:00 List-Id: 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. 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. -- Jeff Carter "C++: The power, elegance and simplicity of a hand grenade." Ole-Hjalmar Kristensen 90