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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,36a55639406b266c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-12 04:34:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3C8DE8B0.51FA1AE8@earthlink.net> From: "Marc A. Criley" Organization: Quadrus Corporation X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Timestamps in Ada References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 12 Mar 2002 12:34:01 GMT NNTP-Posting-Host: 158.252.123.112 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1015936441 158.252.123.112 (Tue, 12 Mar 2002 04:34:01 PST) NNTP-Posting-Date: Tue, 12 Mar 2002 04:34:01 PST X-Received-Date: Tue, 12 Mar 2002 04:34:03 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:21107 Date: 2002-03-12T12:34:01+00:00 List-Id: "A.I" wrote: > > Hi, I want a server program to write logfiles with timestamping, something > like: > > ... > [11/03/2002 13:04:15] Connection from 127.0.0.0 > ... > > how can I get the Date and Time in Ada? and conversion to string? Use the Clock function in the standard Calendar package to get the time (which comprises both date and time), and if you're using GNAT, you can use the GNAT.Calendar.Time_IO function to convert it into the desired string representation. There are some other "time conversion" utilities available that others here will likely mention. Marc A. Criley Consultant Quadrus Corporation www.quadruscorp.com