comp.lang.ada
 help / color / mirror / Atom feed
From: Geoff Bull <geoff@research.canon.com.au>
Subject: Re: C date package
Date: 2000/05/10
Date: 2000-05-10T01:28:48+00:00	[thread overview]
Message-ID: <3918BB77.693C70D6@research.canon.com.au> (raw)
In-Reply-To: 8f92o1$6v$1@nnrp1.deja.com

Oops, I posted to comp.lang.ada by mistake!
This was a thread on team-ada discussing which started with
the "2038 bug".

Robert Dewar wrote:
> 
> In article <39178DEA.FD2C20FA@research.canon.com.au>,
>   Geoff Bull <geoff@research.canon.com.au> wrote:
> 
> > The current Ada.Calendar is pretty weak - just reports an
> > implementation defined time - local time on my system.
> 
> Well that seems pretty strong to me, given that the design point
> of the Ada.Calendar package is precisely to report the commonly
> used local time on your system.
> 
> Almost any package is weak if you start expecting it to do
> things completely outside what it was designed for


Fair enough, weak was probably the wrong word (maybe I should used "basic")
- it doesn't even split out hours and minutes.

And it would be reasonable to believe that anything in the
Ada standard meets the design goals.
But I don't even see where the RM says it reports local time, UTC
UT1, TAI or whatever. Of course this is documented, as required,
in the Gnat reference manual.

9.6 23.The time base associated with the type Time of package
       Calendar is implementation defined.

9.6 24.The functions Year, Month, Day, and Seconds return the
       corresponding values for a given value of the type Time,
       as appropriate to an implementation-defined timezone.

So if I run two different Ada compilers on my system they are quite within
their rights to report different times.

A function that reported the offset from UTC, e.g., would be useful.
I guess implementations that didn't know about timezones would
have to be permitted to always return 0.
It would be a bit much to ask for the weekday name when ther is no
awareness of the current locale.

Cheers
Geoff




  reply	other threads:[~2000-05-10  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <l0313030eb53d1408aee7@[144.205.16.58]>
2000-05-09  0:00 ` C date package Geoff Bull
2000-05-09  0:00   ` Geoff Bull
2000-05-09  0:00     ` Robert Dewar
2000-05-10  0:00       ` Geoff Bull [this message]
2000-05-10  0:00         ` Robert Dewar
2000-05-10  0:00           ` Ada Calendar oddity <was Re: C date package> Preben Randhol
2000-05-10  0:00             ` Tarjei Tj�stheim Jensen
2000-05-11  0:00               ` Geoff Bull
2000-05-11  0:00                 ` Gautier
2000-05-12  0:00                   ` Geoff Bull
2000-05-12  0:00                     ` Gautier
2000-05-11  0:00                       ` Al Christians
2000-05-11  0:00               ` Charles Hixson
2000-05-11  0:00                 ` Tarjei Tj�stheim Jensen
2000-05-12  0:00                   ` Charles Hixson
2000-05-12  0:00                     ` Tarjei Tj�stheim Jensen
2000-05-10  0:00             ` Robert A Duff
2000-05-10  0:00               ` Preben Randhol
2000-05-10  0:00                 ` Charles Hixson
2000-05-11  0:00                   ` Geoff Bull
2000-05-11  0:00                     ` Charles Hixson
2000-05-12  0:00                       ` Geoff Bull
2000-05-17  0:00               ` Robert I. Eachus
2000-05-19  0:00                 ` Geoff Bull
2000-05-19  0:00                   ` Robert I. Eachus
2000-05-21  0:00                     ` Robert Dewar
2000-05-21  0:00                   ` Robert Dewar
     [not found]                     ` <392869F0.D88F056A@acenet.com.au>
2000-05-22  0:00                       ` Tarjei Tj�stheim Jensen
2000-05-27  0:00                         ` Reinert Korsnes
2000-05-27  0:00                           ` Tarjei Tj�stheim Jensen
2000-06-03  0:00                       ` Robert I. Eachus
2000-05-10  0:00           ` C date package Geoff Bull
2000-05-10  0:00           ` Ken Garlington
2000-05-10  0:00             ` Geoff Bull
replies disabled

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