[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No-Slot Clock
TEXAS II - AppleWorks <a2mg@aol.comNomail> wrote:
> > Year values of 100 through 127 are illegal.
>
> Hi, Dave. I am very glad to have your input on this issue. Glen's patch to
> ProDos does make the year 100 (a value of $C8 at $bf91, rolled one bit makes
> 100).
That must be a patch to the clock driver; it would have to be different
for each clock driver (the built-in Thunderclock driver, the built-in
IIgs clock driver, and any third party driver patched into the PRODOS
file or loaded after boot).
It is exactly what Apple's technote says is the wrong solution. If an
application is written to follow the guidelines in the technical note,
then this patch will cause compliant applications to break, while
allowing some non-compliant ones to work.
The correct solution is for applications to treat year values of 0 to 39
as being 2000 to 2039, with year values of 40 to 99 being 1940 to 1999.
In many cases this would require adding code to the application, and
hence would be difficult to apply as a patch to the program.
The major issues with having to support this boil down to:
1. If the century is displayed anywhere, interpreting the ranges
correctly and producing "19" or "20" accordingly.
2. If dates are compared to determine which one is later, it is not
possible to do a simple 16-bit comparison on the packed date. The year
range must be checked and the comparison modified accordingly.
3. If the application uses its own representation for the date, which
includes enough information to distinguish between the 1900s and 2000s,
then it must take the year ranges into consideration. An example of
this would be an implementation of the time() function in a C library,
which produces a 32-bit time which represents the number of seconds
since some base date (usually 1 Jan 1970 on a Unix system).
--
David Empson
dempson@actrix.gen.nz
Snail mail: P O Box 27-103, Wellington, New Zealand