Use difftime() instead of subtracting time_t values when choosing the date format. This avoids signed overflow for far past or future timestamps without changing normal output.
Use difftime() instead of subtracting time_t values when choosing the date format. This avoids signed overflow for far past or future timestamps without changing normal output.