comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Getting current date and time
Date: Mon, 23 Jul 2007 14:43:30 -0700
Date: 2007-07-23T14:43:30-07:00	[thread overview]
Message-ID: <1185227010.432172.50300@e16g2000pri.googlegroups.com> (raw)
In-Reply-To: <1185221307.073177.279370@n60g2000hse.googlegroups.com>

On Jul 23, 1:08 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> On 23 Lip, 22:02, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
>
> > I've found it now in the Index - it is described in section 9.6, which
> > is not part of the standard library description.
>
> Still, I don't know how to portably get the number of seconds in the
> Unix epoch (for example, now is 1185221230). The built-in Duration
> type is not guaranteed to have the necessary range.
> How to solve it?

In Ada 2005, this is handled by the Differences procedure in
Ada.Calendar.Arithmetic (9.6.1).  You can use Ada.Calendar.Time_Of to
create the Time value for January 1, 1970, and then use that as a
parameter to Differences.

                     -- Adam





  reply	other threads:[~2007-07-23 21:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 21:21 Getting current date and time Maciej Sobczak
2007-07-22 23:00 ` Martin
2007-07-23 15:24   ` koburtch
2007-07-23 19:57   ` Maciej Sobczak
2007-07-23 20:02     ` Maciej Sobczak
2007-07-23 20:08       ` Maciej Sobczak
2007-07-23 21:43         ` Adam Beneschan [this message]
2007-07-24  8:53           ` Maciej Sobczak
2007-07-24  9:41             ` Georg Bauhaus
2007-07-24  9:58               ` Maciej Sobczak
2007-07-24 15:24             ` Adam Beneschan
2007-07-25  7:26               ` Maciej Sobczak
2007-07-25  7:42                 ` AW: " Grein, Christoph (Fa. ESG)
2007-07-28  8:20             ` Wilhelm Spickermann
2007-08-01  9:45         ` Jacob Sparre Andersen
2007-07-23 21:39       ` Adam Beneschan
2007-07-23 19:26 ` Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox