Re: ctime

Richard B. Johnson (root@chaos.analogic.com)
Wed, 10 Dec 1997 12:59:21 -0500 (EST)


On Wed, 10 Dec 1997, Rik van Riel wrote:

> On Tue, 9 Dec 1997, Richard B. Johnson wrote:
> > On Tue, 9 Dec 1997, Gabriel Paubert wrote:
> > > On Sun, 7 Dec 1997, Albert D. Cahalan wrote:
[SNIPPED]
>
> OpenDOS uses both even and odd seconds however...
> What about PC-DOS (the third strain of DOSes) ??
>
> Rik.

This is really hard to do, considering there are only 32 values
available for seconds in the unsigned short time field.

Time is at offset 0x16
The time field is HHHHHMMM MMMSSSSS
| | |___ 0 - 29 (seconds)
| |________ 0 - 59 (minutes)
|_______________ 0 - 23 (hours)

Date is at offset 0x18
The date file is YYYYYYYYM MMMDDDDD
| | |___ 1 - 31 (day)
| |________ 1 - 12 (month)
|_____________ 0 - 119 (Year)
offset from 1980

In order to be compatible, you have to have these fields in the correct
place and they have to mean the same thing. Now, whatever OpenDOS is,
if it doesn't use this format, it's not compatible with MS-DOS and
therefore doesn't count as "DOS". An eight-year-old could make a better
file-system than DOS, and would probably combine the date/time into a
single longword format, however the result would (thankfully) not
be a DOS format and it would not be compatible.

Cheers,
Dick Johnson

Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.1.70 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.