diff --git a/bitcoinlib/services/blocksmurfer.py b/bitcoinlib/services/blocksmurfer.py index 3fa7fa84..f8aad46e 100644 --- a/bitcoinlib/services/blocksmurfer.py +++ b/bitcoinlib/services/blocksmurfer.py @@ -74,7 +74,7 @@ def getutxos(self, address, after_txid='', limit=MAX_TRANSACTIONS): 'size': u['size'], 'value': u['value'], 'script': u['script'], - 'date': datetime.strptime(u['date'][:19], "%Y-%m-%dT%H:%M:%S").replace(tzinfo=timezone.utc) + 'date': datetime.strptime(u['date'][:19], "%Y-%m-%dT%H:%M:%S+00:00").replace(tzinfo=timezone.utc) }) return utxos[:limit] @@ -85,7 +85,7 @@ def _parse_transaction(self, tx, block_height=None): self.latest_block = self.blockcount() if not self.latest_block else self.latest_block confirmations = self.latest_block - block_height tx_date = None if not tx.get('date') else ( - datetime.strptime(tx['date'], "%Y-%m-%dT%H:%M:%S").replace(tzinfo=timezone.utc)) + datetime.strptime(tx['date'], "%Y-%m-%dT%H:%M:%S+00:00").replace(tzinfo=timezone.utc)) t = Transaction(locktime=tx['locktime'], version=tx['version'], network=self.network, fee=tx['fee'], size=tx['size'], txid=tx['txid'], date=tx_date, input_total=tx['input_total'], output_total=tx['output_total'], confirmations=confirmations, block_height=block_height,