Sanitize input (trains may now arrive at 24:00)