Minor fix in time validation to avoid reaching loop and maximum callstack error