The type of time_t (was: struct tm -> time_t converter wanted)

Roland McGrath mcgrath at tully.Berkeley.EDU.berkeley.edu
Thu Oct 27 09:36:16 AEST 1988


["The type of time_t (was: struct tm -> time_t converter wanted)"] - henry at utzoo.uucp (Henry Spencer):
) In article <9816 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
) >There's nothing to prevent time_t from being typedef'd to unsigned long int,
) >which would double the range...
) 
) Unfortunately, it would probably break a significant number of programs that
) think time_t is signed.  Those programs are arguably broken already, but some
) degree of pragmatism is necessary in such matters.

With the Epoch defined as it is for Unix (Jan 1 00:00:00, 1970), it is
desireable to have a signed `time_t' type.  Although I didn't, the world
did exist before 1970.
	Roland McGrath

roland at wheaties.ai.mit.edu, mit-eddie!wheaties.ai.mit.edu!roland



More information about the Comp.std.c mailing list