Simplified the time_t overflow check and moved an extra_len rounding