Fix invalid time_t value