Skip to content

Commit

Permalink
Add timezone to now() method
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Dec 20, 2023
1 parent 9f52c6f commit f108522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitcoinlib/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f108522

Please sign in to comment.