From f108522e2bf2699342b5868125245153385857ea Mon Sep 17 00:00:00 2001 From: Lennart Date: Wed, 20 Dec 2023 20:32:01 +0100 Subject: [PATCH] Add timezone to now() method --- bitcoinlib/wallets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoinlib/wallets.py b/bitcoinlib/wallets.py index 23c43ec6..9a611273 100644 --- a/bitcoinlib/wallets.py +++ b/bitcoinlib/wallets.py @@ -2831,7 +2831,7 @@ def utxos_update(self, account_id=None, used=None, networks=None, key_id=None, d raise WalletError("No response from any service provider, could not update UTXO's. " "Errors: %s" % srv.errors) if srv.complete: - self.last_updated = datetime.now() + self.last_updated = datetime.now(timezone.utc) elif utxos and 'date' in utxos[-1:][0]: self.last_updated = utxos[-1:][0]['date'] @@ -3114,7 +3114,7 @@ def transactions_update(self, account_id=None, used=None, network=None, key_id=N txs = [] addresslist = self.addresslist( account_id=account_id, used=used, network=network, key_id=key_id, change=change, depth=depth) - last_updated = datetime.now() + last_updated = datetime.now(timezone.utc) for address in addresslist: txs += srv.gettransactions(address, limit=limit, after_txid=self.transaction_last(address)) if not srv.complete: