Nitpick: you can do `value = min(value, 86400)`