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,e686c2c95beefb1c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Inserting Calendar.Time in a database Date: Mon, 9 Aug 2004 10:02:37 +0200 Message-ID: <1p75q0xg5zca9.edinb91wmjdr.dlg@40tude.net> References: <1jgik0ntrex36$.1pyha1husddpe.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de KmJm8SXpzTLg1TjhEZTACgI/liuRcDhDdIGsfBo5nV8veQ0xE= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:2631 Date: 2004-08-09T10:02:37+02:00 List-Id: On 08 Aug 2004 11:46:34 +0100, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> should be an atomic way to get exact UTC. Actually >> Ada.Real_Time.Time seems a better candidate for UTC. > > I don't see why you would think that? I think that it is better to add a child package to Ada.Real_Time. Or else to have Ada.Universal_Time described in the annex E. > D.8(19): > "The Time value I represents the half-open real time interval > that starts with E+I*Time_Unit and is limited by E+(I+1)*Time_Unit, > where Time_Unit is an implementation-defined real number and E is > an unspecified origin point, the epoch, that is the same for all > values of the type Time. It is not specified by the language > whether the time values are synchronized with any standard time > reference. For example, E can correspond to the time of system > initialization or it can correspond to the epoch of some time > standard." So we could add a function, which will give a correspondence between E and UTC epoch. That is for getting UTC. There is of course another problem, how one deals with UTC time stamps? Especially with ones for which there is no corresponding Time value. So I'd prefer a full-blown data type oriented on some international standard. > In GNAT Ada.Real_Time.Time is bitwise identical to Ada.Calendar.Time > (which I believe to be a mistake, but quite hard to fix). Yep, it should be a two-clock system. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de