Adjust the time if necessary