Date in a V7 mail From line?

Erik E. Fair fair at dual.UUCP
Wed Mar 21 06:57:52 AEST 1984


If you want to keep standard, ctime(3) returns a 26 character, null terminated
string as in the following example:

	Tue Mar 20 12:32:40 1984

This is the same on V7, System III, System V (that's what we're running), and
all of the 4BSD systems. ANYONE who is putting timezone into ctime(3) output
is violating the standard, and he/she/it will break a LOT of software.

The `From' line in UNIX Mail also has a standard format that is of the form:

	From fair Tue Mar 20 12:38:16 1984

ARPAnauts will note with disgust that there is NOT a colon after the field
identifier. Well, sorry guys, this is the way we doit in UNIX Land. The
return address is the second field in the line, and it is delimited by
one space on either side. The rest of the line is a date in ctime(3) format.

Now, by way of example, a story:

	Once upon a time some hackers at Duke University noticed that ctime(3)
produces two spaces between the Month and the day of the month when the day of
the month was less than 10 (e.g. `Mar  3'). They decided this was ugly. They
changed it to produce one space. When the first of the month rolled around,
loud screams of anguish were heard from all over bangland. No one could read
Mail from `duke'! It parsed all wrong. Insofar as I am aware, `duke' did the
sensible thing, and changed back.

Moral: Leave it the HELL alone!

	Erik E. Fair

	dual!fair at Berkeley.ARPA
	{ihnp4,ucbvax,cbosgd,decwrl,amd70,fortune,zehntel}!dual!fair
	Dual Systems Corporation, Berkeley, California



More information about the Comp.unix.wizards mailing list