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!feeder3.cambrium.nl!feeder8.cambrium.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!npeer.de.kpn-eurorings.net!npeer-ng2.de.kpn-eurorings.net!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool3.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> Date: Mon, 15 Dec 2008 14:35:57 +0100 Message-ID: <1geixp6clszrn$.lotvq9n486uu$.dlg@40tude.net> NNTP-Posting-Date: 15 Dec 2008 14:35:57 CET NNTP-Posting-Host: eadd7fec.newsspool4.arcor-online.net X-Trace: DXC=>9T:]:BX[TLgj[ZPFj7ehO4IUKkgB4f6g`Zh79[M X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:3965 Date: 2008-12-15T14:35:57+01:00 List-Id: On Mon, 15 Dec 2008 13:14:48 +0100, m.collado@domain.invalid wrote: > Dmitry A. Kazakov escribi�: >> On Mon, 15 Dec 2008 08:45:17 +0100, Wilhelm Spickermann wrote: >> >>> Additionally we should have time zone tables (without leap second >>> information) for political time (also needing the ability to >>> specify "unknown") to do conversions between "political text >>> representations of time" and "wall clock" time. It also contains >>> the completely predefined time zone "UTC". >> >> I think it can be done much simpler. Conversion to/from political time >> should simply take time zone offset as the parameter. This is how presently >> Ada.Calendar.Formatting does. The package Ada.Calendar.Time_Zones already >> has all tables behind the function UTC_Time_Offset. The only problem is the >> argument of the function. It must be UTC time instead of political one. > > Things are in fact more complex than that. The "official" or "political" > time changes not only with the country, but also with the season, > because of daylight savings. And the summer/winter periods change over > years for the same country. So we need a complete history record of > starting/ending daylight savings periods for each year and each country > to correctly compute "political" times from UTC times. And the timezone, > or even the calendar of a given country also changes over years. > > As an example of the troubles introduced by a ill-designed time > reporting policy, consider the way modern MS-Windows OSs report file > timestamps. They suddently change at the last sunday of March and > October in european countries. I once had a Modula-2 compiler system > that unexpectedly ceased to work (reporting broken installation) after > the first winter/summer change when I activated the "Automatic change > time with winter/summer time". Exactly. That is why Ada.Calendar.Time_Zones has to be an optional package when dealing with time. Presently in order to obtain UTC, we need Time_Zones (assuming that it weren't broken). That is the world turned upside down. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de