Is there a way to get the node's local time when a block was received?

0

As in, not the miner's timestamp in the blockheader which can be +/- 2 hours, but the receiving node's local time. My concern is the real-world time that elapses between blocks.

pinhead

Posted 2016-01-14T20:45:23.543

Reputation: 2 356

Answers

1

When your bitcoin node connects to another node it requests the current timestamp from the node. It stores this value to calculate the offset from your PC's clock. As you may be aware the bitcoin network calculates the network time based upon the average offset of the peers that it is connected to. This will never alter the systems clock more than 70 minutes in regards to network time calculations.

References: Block timestamp

Mark S.

Posted 2016-01-14T20:45:23.543

Reputation: 2 415