This lets us skip a type conversion below.
Also fix a type conversion issue for when secs_before is set to a nondefault value.