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: 103376,27d478aa577d0f8b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.glorb.com!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Getting current date and time Date: Wed, 01 Aug 2007 11:45:47 +0200 Organization: Jacob's private Usenet server Message-ID: References: <1185139279.071088.106330@d55g2000hsg.googlegroups.com> <1185145228.126307.301840@d55g2000hsg.googlegroups.com> <1185220676.926492.258330@g4g2000hsf.googlegroups.com> <1185220926.372760.52420@q75g2000hsh.googlegroups.com> <1185221307.073177.279370@n60g2000hse.googlegroups.com> NNTP-Posting-Host: dhcp53.dhcp.nbi.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: jacob-sparre.dk 1185961547 2564 172.24.5.53 (1 Aug 2007 09:45:47 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 1 Aug 2007 09:45:47 +0000 (UTC) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:uPeuM/GNkwli1xZ2O55Kz155p/g= Xref: g2news2.google.com comp.lang.ada:1319 Date: 2007-08-01T11:45:47+02:00 List-Id: 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