the logic for trying to detect the maximum value of time_t was broken; since we target a lower maximum time anyway, just use that for the overflow check