(Excerpts from a message dated 09-05-99, George White to Jonathan De
Boyne Pollar)
Hi George--
JDBP> Ironically, this ability in the TOUCH and XDIR
JDBP> commands has revealed two
JDBP> Year 2100 bugs in OS/2's own FAT and HPFS filesystem drivers!
GW>I thought we'd found those long ago... I remember discussions of the
>date range supported by REXX and the OS/2 API long ago and that dates
>beyond 31/12/2099 were not handled correctly. I might even have it
>archived somewhere...
I've never used Jonathan's set of programs because (among other
reasons) I have a philosophical difference with him as to the time zone
my system clock is to be set at :-). (Also, I prefer to live with the
idiosyncrasies of the utilities I write myself, rather than trying to
adapt to those written by someone else!) IIRC, the OS/2
date-manipulation functions don't know that 2100 is not a leap year.
This really doesn't matter much, since the OS/2 system clock end-of-time
is midnight 31 December 2079; the end-of-time for all file directories
compatible with the DOS convention (including both FAT and HPFS OS/2
files) is 31 December 2107 ("years since 1980" is carried as a seven-bit
variable; see the definition of FDATE). Thus, the fact that OS/2
doesn't know that 2100 is not a leap year isn't important to most of us:
the "system" can't write a file with a date after 2079 unless aided by
an expanded "touch" utility. AFAIK, programmers are the only ones who
use a "touch" utility, and programmers are supposed to know enough to
test their assumptions as to how the system operates under unusual
circumstances before they write their programs.
As I understand it, Jonathan's original TOUCH utility used the
"system" to correct the user-provided file date (if invalid) to what the
system thinks the next valid date might be, so the fact that the system
thinks 2100 is a leap year could have a deleterious effect if you are
counting on that program to do your thinking for you that far in
advance! (I gather, from his announcement, that this has been corrected
in his latest edition.) Since I never liked living with decisions the
system makes for me that I should have made for myself, my TOUCHIT
utility (written in 1994 in REXX plus an "external function" DLL)
includes my programmed checks for the validity of all input dates and
times and rejects invalid ones, so I have to re-enter them. Since I
wrote the date and time checks, rather than depending on those provided
by the system, I never knew, nor cared, that some OS/2 programmer made
the assumption that it didn't matter whether or not OS/2 knew that 2100
was not a leap year.
Pardon the late response, but I have been (literally) at sea for the
past week, so haven't had an internet connection :-(.
Regards,
--Murray
___
* MR/2 2.25 #120 * An assumption is simply a bug waiting to bite (David
Noon)
--- Maximus/2 2.02
* Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)
|