<p>Transactions do not have a time. There is a time that your node received the transaction, but that is not necessarily the time that the transaction was originally broadcast.</p>

<p>To get the time of a transaction being accepted to your node's mempool, you can add <code>debug=mempool</code> to your bitcoin.conf file and then restart Core. Then grep through the debug.log file for any lines of the form <code>"AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)</code>. Since all lines have a time logged with them, you can get the time that a transaction was accepted to your node's mempool. However this will not include any transactions that are first received in a block.</p>

CC BY-SA 3.0
2017-07-11T05:49:08.370Z
If transactions do not have a time. then how blockchain.info shows Received Time. what if i use UNIX time for transactions that are being accepted by my node????
Shehreyar
CC BY-SA 3.0
2017-07-11T05:51:09.277Z
blockchain.info displays the time that their node received the transaction. That is not necessarily the time that the transaction was broadcast to the network. The time that they display also changes; when a transaction is confirmed, they set the time to the timestamp of the block it was included in.
Ava Chow
CC BY-SA 3.0
2017-07-10T07:21:00.897Z
2017-07-10T07:21:00.897Z
Ava Chow
<p>for research purpose i needed Transaction hash,size, fee and received time. i have already managed to get hash, size and fee but unable to get time. what to do?</p>

<blockchain><bitcoind>
how to get Received Time of Transaction in validation.cpp bitcoin core
Shehreyar
# how to get Received Time of Transaction in validation.cpp bitcoin core

(Asked by: username_0 on 2017-07-10)

for research purpose i needed Transaction hash,size, fee and received time. i have already managed to get hash, size and fee but unable to get time. what to do?

**Tags:** blockchain, bitcoind


---

## 1 answers

### Answer by username_1 on 2017-07-10. Score: 2 | Accepted answer

Transactions do not have a time. There is a time that your node received the transaction, but that is not necessarily the time that the transaction was originally broadcast.

To get the time of a transaction being accepted to your node's mempool, you can add `debug=mempool` to your bitcoin.conf file and then restart Core. Then grep through the debug.log file for any lines of the form `"AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)`. Since all lines have a time logged with them, you can get the time that a transaction was accepted to your node's mempool. However this will not include any transactions that are first received in a block.

> **Comments:**
> **username_0**: If transactions do not have a time. then how blockchain.info shows Received Time. what if i use UNIX time for transactions that are being accepted by my node????  
> **username_1**: blockchain.info displays the time that their node received the transaction. That is not necessarily the time that the transaction was broadcast to the network. The time that they display also changes; when a transaction is confirmed, they set the time to the timestamp of the block it was included in.  

---

