TIP: Click on subject to list as thread! ANSI
echo: os2
to: Murray Lesser
from: Jonathan de Boyne Pollard
date: 1999-09-15 21:25:06
subject: TOUCH

 ML> As I understand it, Jonathan's original TOUCH utility used the
 ML> "system" to correct the user-provided file date (if invalid) to what
 ML> the system thinks the next valid date might be, so the fact that the
 ML> system thinks 2100 is a leap year could have a deleterious effect if
 ML> you are counting on that program to do your thinking for you that far
 ML> in advance!  (I gather, from his announcement, that this has been
 ML> corrected in his latest edition.)  

There was never anything to correct.  TOUCH passes dates and times as
specified on its command line to the operating system exactly as they stand,
and always has done.

The plain fact of the matter is that it was when testing TOUCH that I
discovered that the operating system, or more specifically the filesystem
drivers, actually modifies the dates and times that are passed in a
DosSetPathInfo() call in certain cases, and the actual date and time that is
set on the file is thus not the value that was passed to the operating system
in the system call.  

The FAT filesystem driver silently translates all years beyond 2099 to the
year 2099, but is quite happy with nonsense dates like the 31st of February. 
The HPFS filesystem driver has a completely different set of bugs, on the
other hand.  It silently converts nonsense dates like the 31st of February to
the nearest real date, but this code contains a bug in that it doesn't know
that the year 2100 is not a leap year, and allows the date 2100-02-29 to be
set on a file or directory.

 ¯ JdeBP ®

--- FleetStreet 1.22 NR
* Origin: JdeBP's point, using Squish (2:257/609.3)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.