[Oberon] File time stamps in PO2013
Chris Burrows
chris at cfbsoftware.com
Fri Feb 14 01:51:56 CET 2020
The base year used in Project Oberon is 2000. That is what we also use in HCFiler and the additional RTC and FileDate facilities in Embedded Project Oberon. Refer to section 8.3 The Kernel in the 2013 Revised Edition of the Project Oberon book.
Regards,
Chris Burrows
CFB Software
https://www.astrobe.com
From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Charles Perkins
Sent: Friday, 14 February 2020 6:06 AM
To: ETH Oberon and related systems
Subject: [Oberon] File time stamps in PO2013
I'm writing a linux kernel filesystem driver for Project Oberon disk images and I'm wondering how best to interpret the Date field in the FileDesc record.
It looks to me like the Files module just puts the latest Kernel.Clock() value in there when the file is written.
System.Mod sets the date value like this:
dt := ((((yr*16 + mo)*32 + day)*32 + hr)*64 + min)*64 + sec;
It looks to me like the above formula leaves 6 bits for the year, which means it ranges from 0 to 63.
Now I know that the FPGA doesn't actually have a real time clock and I think the time is always actually zero unless you set it to something else. I don't think it gets updated from the system millisecond timer either.
I'm just wondering if historically that year value that goes in a file header has a base year or other meaning. Without something like that the maximum year is "63" which is a long time ago!
I'd like to put something meaningful in this field when I move files in and out of Linux.
Anybody have a good idea? Should I just make it based on Jan 1 1970 like Unix, in which case it rolls over in 2033?
Am I over-thinking this?
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200214/08bf83c7/attachment.html>
More information about the Oberon
mailing list