Te old
VAX-11/780 TOY clock didn't store the year.? Instead it was
stored and loaded from the system disk file system (one of the files in
[000000] - I can't remember the exact details).? Every year in January
we had to do a "SET TIME" command to update it.
I think it's the same on all VAXen.
But usually you did not have to do a set time, since the file was/is
normally getting updated time stamps during normal operation as well, if
I remember right. But the logic will only work if the machine is
rebooted within roughly a year since it was shut down. Else the year
will be wrong.
The hardware TOY clock is a simple counter that ticks every 10 milliseconds
and is good for about 466 days. The base year is stored in SYS.EXE, i.e. the
whole kernel until V4 and some sort of dispatch table starting in V5 when the
kernel got subdivided into modules. At system startup the software clock is
initialized by adding to January 1st of the base year the value stored in the
TOY clock which represents a given number of days, hours, minutes, etc. In
other words it works from January 1st of the base year to April 11th of the
following year (April 10th in leap years). The SET TIME command resets the
value in the TOY clock to the number of ticks from January 1st of the current
year and sets the base year in SYS.EXE as necessary. During normal system
operation the TOY clock doesn't get updated but an automatic SET TIME is
executed during any orderly system shutdown. If, for whatever reason, the
system stops abruptly and is rebooted after April 11th then it will come up
with the wrong date (and will wreak havoc in log files and file timestamps).
Hence it was usual to issue a manual SET TIME in early January (or anytime
within April 11th) to ensure that the TOY clock and SYS.EXE got properly
reset, and that automatic reboots didn't ask for date and time (see below).
As a safety net against problems (e.g. a system that was shut down more than
one year before) it's always possible to perform a conversational boot and
temporarily set the SYSGEN variable SETTIME to 1 which will force the
prompting of the current date and time. The same also happens automatically
whenever the TOY clock is found to have a value of zero, e.g. because its
battery is exhausted, or more generally whenever the MSB of the counter is
zero, thus giving a grace period of about 31 days after its overflow, i.e.
between April 11th and May 12th of the year following the base year. :)
HTH,
G.