Warren's note reminds me of a few other Y2K bugs I've spotted that affect
ancient UNIX:
- date: no way to set the date past 1999 unless in the present year,
because two-digit input.
- at and atrun: commands are stored in the spooling directory with names
of the form YY.DDD.HHMM.xx, where xx is a unique number. This one is
trickier to fix, because the filename is already exactly 14 characters,
so there's no room for expansion. (On V10, I just rewrote the programs
to use a simple UNIX time expressed as a decimal number. A simpler solution
might be to print the year in hex.)
- Perhaps least consequential and most amusing: nroff and troff store the
year in a number register. The manual says it contains `the last two
digits of the year,' and many macro packages assume that is true, but the
truth is that it contains (year-1900), the same as tm_year. So, for example,
when I ran man on New Year's Day, I was told that the manual page had been
printed on 1/1/100.
I was about to fix the various troff macro packages when I noticed that
the manual implied that I shouldn't. I asked Brian Kernighan for an opinion
(since the code and the manual were both last touched by him); he thinks the
best view is that the manual is just wrong and the macro packages should be
fixed. \n(yr is a read-write register, so `.nr yr \n(yr+1900' is probably
the easiest fix, though Brian points out that it's not always the right one
(maybe you really wanted a two-digit year). If anyone is interested I can
pass along a more detailed note from Brian.
Received: (from major@localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id CAA33653
for pups-liszt; Wed, 5 Jan 2000 02:17:48 +1100 (EST)