Fix parse_seconds bugs, and narrow contract.