So, it appears to me that adding and removing files to the root of the filesystem has no effect on the timestamp of the filesystem that is used to set system time on boot, or that something else goes on. Also, relabelling sys: had no effect on system time after reboot.
No, it does not. The construction is somewhat strange... it's Amiga, after all. One might guess that it is actually the job of the dos.library to somehow find a useful system time from the rtc and use mounted volumes as a backup. However, that's not how it works...
It is the FFS restart function which does. If it detects that the dos date is unset (that is, if the time in the dos "root node" is all zero), it takes the *creation date* of the disk it currently mounts and places it into the dos root node.
Changing the root directory or the bitmap does not modify the creation date of the volume, of course, and hence it does not change the date the system gets.
Of course this also implies that the date on a non-rtc system depends on the volume you boot from, and this can be of course in the past of another volume in the system. Sick!
What dos should really do is take the max of all volumes it is aware of, and FFS should stop fiddling with the system time, and the date should only be set if the system knows that there is no rtc. That FFS needs to mess with the system clock is only for the consistency of the FFS itself (as in: All files on the disk should be created later than the creation date of the disk, which is sensible)....
Surprisingly, Tripos aka dos.library v33 did something different. Back then, "FFS" was not a separate source, but part of the monolithic junk that came from Tripos, and *there* we find
AND bumpdate() BE
$(
LET v = VEC 2
datstamp( v )
// only reset the date if this is the boot disk and time is unset
IF unit.no = 0 & v!0 = 0 THEN
$(
IF comparedate( v, date.scan ) < 0 THEN
$(
setdosdate( date.scan )
$)
$)
$)
IOWs, the date is only set on unit zero (hardcoded!) and the days of the current date are zero (remember the BPCL indirection operator "!"), and then a comparison of the date with the already set date is made.
This looks equally wierd, but at least there is a test not to set the date backwards.