fix tm_to_time logic for number of days in november