This is a backport of [[https://github.com/bitcoin/bitcoin/pull/21043 | core#21043]]
Most of the work was already done in D6022. This merges the functional test from that diff into rpc_uptime.pyThe functional test already exists in abc_rpc_mocktime.py, only the error messages need to be updated.