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,335675a1cb969fdb X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada.Calendar.Time_Zones Date: Wed, 6 Aug 2008 21:52:53 -0500 Organization: Jacob's private Usenet server Message-ID: References: <1rm26vi0mz4sv.1kfhdnswhcrqa.dlg@40tude.net> <3jxnfgd6m2ff.ca8crnn387m3.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1218077583 26901 69.95.181.76 (7 Aug 2008 02:53:03 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 7 Aug 2008 02:53:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Xref: g2news1.google.com comp.lang.ada:1485 Date: 2008-08-06T21:52:53-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:3jxnfgd6m2ff.ca8crnn387m3.dlg@40tude.net... > On Mon, 4 Aug 2008 17:12:38 -0500, Randy Brukardt wrote: > >> "Dmitry A. Kazakov" wrote in message >> news:1rm26vi0mz4sv.1kfhdnswhcrqa.dlg@40tude.net... >>> Does anybody know the meaning of the result returned by UTC_Time_Offset? >> >> It's as the RM says. > > But how to translate what it says into concrete numbers: > > UTC_Time_Offset (Ada.Calendar.Time_Of (2008, 26, 10, 2.5*60.0*60.0)); =? > > OK, I am posting that to Ada comments as you suggested. I don't think the RM answers your question, which technically means that it is unspecified. It is reasonable to ask if it *ought* to be unspecified, which is why I asked you to ask the ARG. >> It's pretty obvious, though, that there is no way to do this correctly >> unless the time type is based on UTC (time-zone-less) time. And because >> of >> compatibility concerns, the only way to do that is to completely junk >> Ada.Calendar and start over, duplicating essentially everything. You're >> probably right that we should have done that, but it would always be a >> tough >> sell (lots of people would say that Ada.Calendar is "good enough") -- >> which >> is why you need to ask this question directly to the ARG. (And get as >> many >> people as possible to support it, too.) I alone could never produce >> critical >> mass on this topic. > > I don't understand this. Ada.Calendar.Time_Zones, Ada.Calendar.Arithmetic, > Ada.Calendar.Formatting are all new packages. All of them have an > inconsistent semantics, because Time_Of is necessarily inconsistent [*]. > Zone offset is simply not a function of the local time. It is of the UTC > time. You'd have to completely duplicate the contents of Ada.Calendar using a new, very similar time type that is based on UTC. That would have been a hard sell (even if it would have made more sense, since Ada.Calendar.Arithmetic probably would have been included directly as part of it). Your examples make it clear that we should have done that, but we obviously failed to notice that what we did instead doesn't quite work. The real question is whether the hole is important enough to try to fix (given that the fix is going require adding a lot more mechanism). That's a question I can't answer. Randy.