Make time string formatting not crash if given an invalid time.