Bug in date interpolation in netnews.

chris at basservax.SUN chris at basservax.SUN
Tue Dec 6 04:28:58 AEST 1983


Subject: Bug in date interpolation in netnews
Newsgroups: net.unix-wizards

On line 737 (or therabouts) of release 2.10 of funcs.c, in the routine
arpadate, someone makes the assumption that timezone identifiers are 3
characters EXACTLY, except where they are 'GMT[+-]xx'.

Although our local timezone is 'Australian Eastern Time' or
'Australian Summer Time' (both apparently EST), in an effort to make
all your lives easier, we decided to use 'AEST' and 'AESST'.

The problem should now be clear...
What's more, getdate.y already knows about lots of Australian zones.
Unfortunately, the dud date produced is not recognisable as any type
of timezone, and the messages get discarded.

Change the offending code to this...

if (p[0] == 'G' && p[1] == 'M' && p[2] == 'T' && (p[3] == '-' || p[3] == '+')) {
	/* hours from GMT */
	p += 3;
	*q++ = *p++;
	if (p[1] == ':')
		*q++ = '0';
	else
		*q++ = *p++;
	*q++ = *p++; p++; *q++ = *p++; *q++ = *p++;
	*q = '\0';
} else {
	*q++ = ' ';
	while (*q++ = *p++)	/* whole string less that 40 bytes... */
		;
}

return (b);



More information about the Comp.unix.wizards mailing list