comp.lang.ada
 help / color / mirror / Atom feed
From: Jacob Sparre Andersen <sparre@nbi.dk>
Subject: Re: Getting current date and time
Date: Wed, 01 Aug 2007 11:45:47 +0200
Date: 2007-08-01T11:45:47+02:00	[thread overview]
Message-ID: <yge7iof6110.fsf@hugsarin.dmusyd.edu> (raw)
In-Reply-To: 1185221307.073177.279370@n60g2000hse.googlegroups.com

Maciej Sobczak wrote:

> 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?

It sounds like your program is intended to run on POSIX systems, so
why don't you use the appropriate POSIX functions?

declare
   use POSIX.Calendar;
   Wish : POSIX.Seconds;
begin
   Wish := POSIX.Get_Seconds (Time => To_Timespec (Date => Clock));
end;

Greetings,

Jacob
-- 
�If you're going to have crime,
 it might as well be organized crime.�      -- Lord Vetinari



  parent reply	other threads:[~2007-08-01  9:45 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
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 [this message]
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