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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ee78aab9bfd2fe2a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder.news-service.com!ramfeed2.eweka.nl!hq-usenetpeers.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!npeer.de.kpn-eurorings.net!npeer-ng1.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Inspiration for a better calendar package? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <873agxd6i1.fsf@nbi.dk> <12gqldae49yoe$.1sf2zlz1fthvh.dlg@40tude.net> <6qmg8dFd8kd2U1@mid.individual.net> <1jv16tgrmhor4$.c3a8ugjxu6ed$.dlg@40tude.net> <6qn2kmFdflp2U1@mid.individual.net> <6qottgFdsslcU1@mid.individual.net> <18ckfnjlu93l4$.1fpoya8h7dsm7$.dlg@40tude.net> <6qrjqgFebi5uU1@mid.individual.net> <1ev3f68cc0o42$.q4urn4fmkzhq.dlg@40tude.net> <6qvuq5Ff29h2U1@mid.individual.net> Date: Fri, 19 Dec 2008 09:38:11 +0100 Message-ID: <1qhzhjrltdtqi.pckpnuo5oq8q.dlg@40tude.net> NNTP-Posting-Date: 19 Dec 2008 09:38:11 CET NNTP-Posting-Host: e5544b1b.newsspool2.arcor-online.net X-Trace: DXC=3Tb7eA9EHlD;3Ycb4Fo<]lROoRa^YC2XCjHcbi1@B;VFgj1HgDNcfSJ;bb[eFCTGGVUmh?dLK[5LiR>kgbh6lk_>Gl0Xg X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:4017 Date: 2008-12-19T09:38:11+01:00 List-Id: On Thu, 18 Dec 2008 22:48:52 +0100, Wilhelm Spickermann wrote: > Dmitry A. Kazakov wrote: > >> Where is any problem? Except that the algorithm is not good. It >> should be (still the case 2): >> >> delay 60.0 * 60.0 * 24.0 * 25.0 * 3; -- come close enough to judge >> delay until Time_Of (Year =>..., Month =>..., Day =>...); >> -- do things >> exception >> when Time_Error => �-- watch your fingers lady! > > One problem is, that the error message may come 75 days after > typing here. Right. That is the problem of political time. > Trying to solve this problem lead me to "wall time". If we do all > the checks possible early and also take into account the given > time zone and then store the result in a time zone independent > way into some opaque type, which can later be transformed > further -- then this opaque type is just the proposed "wall > time". No you cannot detect these errors early. I don't mean the errors like June, 31 etc. These you can detect using Time_Of. But the errors caused by future regulations are fundamentally impossible to detect before regulations to happen. Ultimately you need to translate a political time specification into real time. What you propose is another way to specify political time (as a data type). That does not change anything. This new specification is as impossible to translate into real time as any other. > Another problem is, that the result type and also the operation > of Time_Of may depend on the Operating System configuration. In > most OS I know, there is no possibility to give an error message > about missing leap second information. The case of a missing > leap second information is just handled as the case of no leap > second. And adding leap seconds or for instance changing a Unix > from "posix" to "right" localtime will bring the times to jump > around even if everything was given in UTC. But this is a compiler vendor's problem. If OS has some holes/bugs in its time services, then there is little we can do about it. Ada cannot define its own time source. Time is incomputable. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de