I used the API of Ethereum to download some transactions info. The timestamp is included, however I found the timestamp not mean the transaction time but the block which this transaction is located founded time. I visited https://etherscan.io for this transaction info. The same is true, the page shows me the time of the block which this transaction is located founded time. How can I get the transaction time rather not block founded time?
3 Answers
All transaction in a specific block were executed at the same time.
Therefore transactionTime
= blockTime
. I hope this makes sense.
-
transactionTime
is the transaction execution time, what about the transaction creation time? This is an action on the wallet side.– MaxareoAug 28, 2019 at 2:02 -
-
Not sure if your argument is sound or not, but wondering if some wallets have transaction creation time logged internally.– MaxareoAug 29, 2019 at 7:22
I think what he meant is if there is a difference between the transaction creation time
and transaction execution time
or equivalently as you two put in your answers, block creation time
. I did not find any information on if transaction creation time is logged. It's supposed to be a functionality of wallets, yet, they may not do the logging.
On Ethereum, the all transactions in a block are processed at the same time and given the same timestamp. This is the same as the timestamp of the block that it is included.
In order to get the timestamp of a specific transaction, simply look up the timestamp of the block that that transaction is included in.