If I unlock an encrypted wallet for 359711509437336256 or less seconds, I can sign transactions with it:

    $ bitcoin-cli walletpassphrase "$x" 359711509437336256
    $ echo $?
    0
    $ bitcoin-cli signrawtransaction $tx | grep complete
      "complete": true

But if I unlock it for 359711509437336257 or more seconds, it appears to have unlocked but I can't sign any transactions:

    $ bitcoin-cli walletpassphrase "$x" 359711509437336257
    $ echo $?
    0
    $ bitcoin-cli signrawtransaction $tx | grep complete
    error code: -13
    error message:
    Error: Please enter the wallet passphrase with walletpassphrase first.

I don't know the significance of that number. It's nowhere near a power of 2.

I was trying to unlock the wallet effectively "forever", so put a big number. If I use too big a number (2^63 or more) I get an error message `JSON integer out of range` but for numbers between 359711509437336257 and 2^63-1 inclusive I get no error, but no actual unlocking.
bool try_no_witness = request.params[2].isNull() ? true : !request.params[2].get_bool();
    if (!DecodeHexTx(tx, request.params[0].get_str(), try_no_witness, try_witness)) {
        throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
    }
    if (tx.vout.size() == 0)
        throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
    if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > tx.vout.size()))
        throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
    for (unsigned int idx = 0; idx < subtractFeeFromOutputs.size(); idx++) {
        int pos = subtractFeeFromOutputs[idx].get_int();
        if (setSubtractFeeFromOutputs.count(pos))
            throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, duplicated position: %d", pos));
        if (pos < 0)
            throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, negative position: %d", pos));
        if (pos >= int(tx.vout.size()))
            throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, position too large: %d", pos));
        setSubtractFeeFromOutputs.insert(pos);
    }
    CAmount nFeeOut;
    std::string strFailReason;
    if (!pwallet->FundTransaction(tx, nFeeOut, changePosition, strFailReason, lockUnspents, setSubtractFeeFromOutputs, coinControl)) {
        throw JSONRPCError(RPC_WALLET_ERROR, strFailReason);
    }
    UniValue result(UniValue::VOBJ);
    result.push_back(Pair("hex", EncodeHexTx(tx)));
    result.push_back(Pair("changepos", changePosition));
    result.push_back(Pair("fee", ValueFromAmount(nFeeOut)));
    return result;
}
UniValue bumpfee(const JSONRPCRequest& request)