From: "Marc A. Criley" <mcNOSPAM@mckae.com>
Subject: Re: Dates and Times in GNAT on Linux
Date: Sun, 13 Sep 2009 15:41:05 -0500
Date: 2009-09-13T15:41:05-05:00 [thread overview]
Message-ID: <88c45$4aad58e2$4a336034$27115@API-DIGITAL.COM> (raw)
In-Reply-To: <h8jh33$ik$1@news.tornevall.net>
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
prev parent reply other threads:[~2009-09-13 20:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 15:36 Dates and Times in GNAT on Linux Marc A. Criley
2009-09-13 16:17 ` Dmitry A. Kazakov
2009-09-13 19:35 ` Jeffrey R. Carter
2009-09-13 20:41 ` Marc A. Criley [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox