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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 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,UTF8 Path: g2news1.google.com!news3.google.com!news.germany.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Wilhelm Spickermann Newsgroups: comp.lang.ada Subject: Re: Inspiration for a better calendar package? Date: Thu, 18 Dec 2008 22:48:52 +0100 Message-ID: <6qvuq5Ff29h2U1@mid.individual.net> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Trace: individual.net DCm4kgh/vgHI5DeljcWxVw38Pq9XwAyR8WS+6txLxLLzQ7NNTM Cancel-Lock: sha1:eEun5F3YT6BZz4d3WnNxLiMa8Dw= Xref: g2news1.google.com comp.lang.ada:3043 Date: 2008-12-18T22:48:52+01:00 List-Id: 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. 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". 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. Wilhelm