[net.news.b] news 2.10 accept DST and other timezones

teus@mcvax.UUCP (Teus Hagen) (09/29/83)

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