Timekeeping in ANSI C
Frank Adams
franka at mmintl.UUCP
Wed Feb 17 09:35:22 AEST 1988
In article <2079 at bsu-cs.UUCP> dhesi at bsu-cs.UUCP (Rahul Dhesi) writes:
>In article <594 at acornrc.UUCP> rbbb at acornrc.UUCP (David Chase) describes a
>structure that holds a time value and continues:
>>This structure can encode dates from 1900 AD to something like 47000 AD.
>Sooner than you can say "UNIX is a Trademark of ...", 47000 AD will be
>here. The greatest mistake a designer can make is to assume that a
>certain date and time will never come.
This is a joke, right?
The correct rule is that any built-in limitations should be ridiculously
large. 2050, for example, is not ridiculously large; even 2500 isn't
really. But 47000 *is* ridiculously large, and thus this scheme meets the
criterion.
I *do* have a problem with it, however: it doesn't go back far enough.
Sure, nobody is going to need to represent current times before 1900 on
their computer, but a good system for representing dates should be able to
deal with history, as well. To be on the safe side, I would go back to
10000 BC; this still gets us to 37000 AD.
(Of course, now you get into the issue of the Julian calendar.)
--
Frank Adams ihnp4!philabs!pwa-b!mmintl!franka
Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108
More information about the Comp.lang.c
mailing list