Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830919); site mcvax.UUCP Path: utzoo!linus!philabs!mcvax!teus From: teus@mcvax.UUCP (Teus Hagen) Newsgroups: net.news.b Subject: news 2.10 accept DST and other timezones Message-ID: <5404@mcvax.UUCP> Date: Wed, 28-Sep-83 19:22:01 EDT Article-I.D.: mcvax.5404 Posted: Wed Sep 28 19:22:01 1983 Date-Received: Fri, 30-Sep-83 22:01:07 EDT Organization: Math.Centre, Amsterdam Lines: 32 Three letters for all the timezone identifications are not enough. A better way is to accept identifications with the add on "DST" for daylight saving time. So Australia and Europe has their summertime back and need not to forward their timezone if they have daylight saving time. The following changes in getdate.y are needed: - Add the token "DST": -+ %token ID ... AGO DST - Add the rule ZONE DST to the "zone" syntax rule: zone: ZONE ... + | ZONE DST = + {ourzone = $1; daylight = DAYLIGHT;} | DAYZONE = ...... - Add the European standard zones to the table mztab[]: ......{"g.m.t.", ZONE, 0 HRS}, /* should be UTC */ + {"eet", ZONE, -2 HRS}, /* European Eastern Time */ + {"e.e.t.", ZONE, -2 HRS}, + {"met", ZONE, -1 HRS}, /* Middle European Time */ + {"m.e.t.", ZONE, -1 HRS}, + {"wet", ZONE, 0 HRS}, /* Western European Time */ + {"w.e.t.", ZONE, 0 HRS}, {"aest", ZONE, -10 HRS}, .....(dst is not needed here) - Add the "dst" in the lexical scan: In routine lookup() ... for (j = idvar; *j; j++) if (isupper(*j)) *j = tolower(*j); + if (strcmp("dst", idvar) == 0) return (yylval = 1, DST); for (i=mztab; i->name; i++) ... -- Teus Hagen Center for Math., Comp. Science (CMCS) formerly Math. Centre (MC) mcvax!teus