correct comparison: the code was valid for 2 days, not 1 day.