[Oberon] File time stamps in PO2013

Charles Perkins chuck at kuracali.com
Fri Feb 14 02:22:33 CET 2020


Well, it looks like we're good until 2063 then! 2000 makes more sense than
1970, and a constant is the simplest thing I can put in the kernel module
so I'm going to go with that.

Now I'm going to go back to parsing the extended sector table so large
files come out right.

Cheers,

Chuck

On Thu, Feb 13, 2020 at 4:52 PM Chris Burrows <chris at cfbsoftware.com> wrote:

> 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
>
>
>
>
>
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200213/01edd98f/attachment.html>


More information about the Oberon mailing list