<p>As you have found, there are no time fields in transaction data.</p>
<p>Blocks have a timestamp but that can be up to 2 hours out.</p>
<p>Nodes can of course choose to record the time at which they first saw a transaction, this might be during relaying of transactions before the transaction is confirmed by being added to a block by a miner.</p>

CC BY-SA 4.0
2023-12-11T21:00:15.587Z
2023-12-11T21:00:15.587Z
RedGrittyBrick
<p>I am trying to build a python program, that returns details of a transaction, such as inputs, outputs, time, amount, etc. I have already loaded bitcoind -txindex, yet, when I decode a raw transaction, I do not get the time field. I have already read that decoderawtransaction does not contain the time of the transaction, but I am curious of the way btc explorers get those data?</p>
<p>The only time fields that I have found are in getblock command and in getrawmempool/getmempoolentry (although I do not focus on unconfirmed transaction). Can i get any info from them?</p>
<p>Thank you for your time.</p>

CC BY-SA 4.0
2023-12-11T20:27:33.737Z
pretty sure that doesn't really exist... block explorers probably write the time to an external DB the moment they receive a transaction on their node(s)
Jan Janssen
<transactions><time>
get exact time of a transaction in the past (not in mempool)
user146833
# get exact time of a transaction in the past (not in mempool)

(Asked by: username_0 on 2023-12-11)

I am trying to build a python program, that returns details of a transaction, such as inputs, outputs, time, amount, etc. I have already loaded bitcoind -txindex, yet, when I decode a raw transaction, I do not get the time field. I have already read that decoderawtransaction does not contain the time of the transaction, but I am curious of the way btc explorers get those data?

The only time fields that I have found are in getblock command and in getrawmempool/getmempoolentry (although I do not focus on unconfirmed transaction). Can i get any info from them?

Thank you for your time.

**Tags:** transactions, time

> **Comments:**
> **username_1**: pretty sure that doesn't really exist... block explorers probably write the time to an external DB the moment they receive a transaction on their node(s)  

---

## 1 answers

### Answer by username_2 on 2023-12-11. Score: 1

As you have found, there are no time fields in transaction data.

Blocks have a timestamp but that can be up to 2 hours out.

Nodes can of course choose to record the time at which they first saw a transaction, this might be during relaying of transactions before the transaction is confirmed by being added to a block by a miner.


---

