Timekeeping in ANSI C

csm at garnet.berkeley.edu csm at garnet.berkeley.edu
Thu Feb 11 09:06:25 AEST 1988


In article <594 at acornrc.UUCP> rbbb at acornrc.UUCP (David Chase) writes:
>   ...   time is represented as a structure containing two unsigned long
>quantities (hi and lo).  The time is encoded as  ...
>This structure can encode dates from 1900 AD to something like 47000 AD.
>It is a pill to work with, of course  ...
>David Chase

 I agree with David that the current UNIXY time functions leave a lot
 to be desired. (BTW 1900 AD is not nearly far enough back - e.g. some
 birthdates will be in the 19th century for a number of years to come.) 
 I for one am tired of writing software that I know will break.  My 
 current workaround is to check the system year and complain and exit
 if the software isn't going to work correctly.
 This group would seem to be the obvious place to establish some sort of
 consensus on better time functions.  Anybody out there proud enough of
 his/her own efforts to show us how it should be done?
             -Brad Sherman



More information about the Comp.lang.c mailing list