The creation time is recorded in the block:
https://en.bitcoin.it/wiki/Protocol_specification#block
And since there's no benign benefit in deferring announcing it, it would seem likely creation time and announcement time would be pretty close. But I accept there are variations, and pretty close may not be good enough.
However there is another approach.
You can use the bitcoind/bitcoin-qt -blocknotify option, described here:
github.com/bitcoin/bitcoin/pull/743
To record the time of new best blocks (which seems to be the like what you want.)
I used
blocknotify=echo date", %s" >> /home/userid/.bitcoin/blocknotify.log
And got:
Sun Jun 23 20:14:15 NZST 2013, 0000000000000069a26870e6f6693d733e32d57174bebb7d21f0fac1212fd83b
Sun Jun 23 20:33:04 NZST 2013, 000000000000003359dff8a8bd1033b02a52c6c2ff3ebb2f8dbffd171c97e83c
Sun Jun 23 20:43:11 NZST 2013, 000000000000004ec1559bd7e955ce8914a29a04b378bbcc34adf5bea077f73d
To clarify, that example of blocknotify was in bitcoind.conf, but it works on the command line too, with appropriate quoting of shell significant characters.
https://github.com/bitcoin/bitcoin/pull/743
To record the time of new best blocks (which seems to be the like what you want.)
I used
blocknotify=echo
date
", %s" >> /home/userid/.bitcoin/blocknotify.logAnd got:
Sun Jun 23 20:14:15 NZST 2013, 0000000000000069a26870e6f6693d733e32d57174bebb7d21f0fac1212fd83b Sun Jun 23 20:33:04 NZST 2013, 000000000000003359dff8a8bd1033b02a52c6c2ff3ebb2f8dbffd171c97e83c Sun Jun 23 20:43:11 NZST 2013, 000000000000004ec1559bd7e955ce8914a29a04b378bbcc34adf5bea077f73d
– Hamish MacEwan Jun 23 '13 at 09:07To clarify, that example of blocknotify was in bitcoind.conf, but it works on the command line too, with appropriate quoting of shell significant characters.
– Hamish MacEwan Jun 23 '13 at 09:16