Refine `Time.to_seconds_after_midnight/1` return type (#15570)