Originally Posted by laserlight
I'd say that it is not guaranteed to work. As far as I can tell, time_t is permitted to be of a floating point type, but bitwise and requires that both operands be of integer types.
True, I believe the only constraint on time_t is that it has to be an "arithmetic type". An example for the use of a floating point based time_t would be the SAS/C environment, used on IBM mainframes.
Isn't an integer underflow, as this uses, undefined behaviour as well? I'm not completely sure here...