You are correct, for anyone using signed 32 bit 2's compliment representation.
It wouldn't roll over to zero unless they were using unsigned, and that wouldn't roll over (for 32 bits) until 4 billion ticks and change.
>
You are correct, for anyone using signed 32 bit 2's compliment representation. It wouldn't roll over to zero unless they were using unsigned, and that wouldn't roll over (for 32 bits) until 4 billion ticks and change. Yep. The problems with "simply" going to an unsigned representation, however, include:
- Incompatibility with all other software and filesystems that use the time_t signed int representation, and
- Inability to represent dates prior to 1970.
Those are likely not problems for, say, an embedded system which doesn't deal with dates before 1970 and doesn't interact with any other software that would interpret values in the "upper half" of the unsigned int range as "negative". But that's a relatively small percentage of systems.