[PLUG] tm struct uses int not long

logical american website.reader3 at gmail.com
Wed Jan 27 21:27:40 UTC 2016


Russell:

The struct tm in time.h is actually composed of "int" types except for 
the tm_zone (add-on with BSD definition) so apparently we have crashed 
on a hardware implementation problem.

int is usually 32 bits, while long is 64 bits, thus avoiding the problem 
we have with wrapping on the negative integer for the date in question 
Nov-18-1883, but this still doesn't explain the odd 422 second difference.

I don't see anyway to change the tm struct to long, as the time.h header 
is standardized.

It would be nice if all 32 bit machines disappeared, and only 64 bits 
(or higher) existed.

- Randall




More information about the PLUG mailing list