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_50,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcsun!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.ada Subject: Re: Timezone/Daylight Savings time info in CALENDAR for Ada 9X... Keywords: CALENDAR, Timezones, Daylight-savings-time Message-ID: <8362@boring.cwi.nl> Date: 29 Aug 89 00:51:33 GMT References: <20800@sequent.UUCP> Organization: CWI, Amsterdam List-Id: In article <20800@sequent.UUCP> paulr@sequent.UUCP (Paul Reger) writes: > I was wondering if any extensions to CALENDAR were planned regarding: > > 1. Timezones. Perhaps implement the 'universal time' (whatever it > is called, the time that airlines, and satellites use) into the > package. Or maybe have information that will name the 24 time zones > in the world and have a function to return what the name of the local > time is. Yup. Implementing UTC looks fine. But although there are 24 timezones according to the US military rules (zones A-Z with some letters omitted), some countries do not conform to this and their time differs not an integral number of hours from UTC (some parts of Canada for instance). Better would be a function that returns the difference of local time and UTC. > > 2. Daylight savings time. This varies from Country to Country, > but it would still be useful for implementations to give this type of > information. (I do not know precisely what I am suggesting an > implementation do with this information, but it would be useful > nonetheless.) Also here, DST is very hairy. Implement a function that returns a boolean that tells whether DST is in effect, and also tells the difference between DST and normal time (it has not always been 1 hour everywhere, so it need not be in the future). An excellent implementation of time routines in C for the Unix system is done by ADO (A. D. Olson), and can be found in the later implementations of BSD Unix, and also in many sources archives. It is public domain. It is not possible to do this portably in Ada, because information regarding DST should be kept in (easy updatable) files because there are a lot of countries with no fixed rules. -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax