<p>No, bitcoind does not. bitcoind does store a timestamp for keys however this timestamp is used to determine when to start rescanning. <code>importprivkey</code> does not allow you to specify this timestamp, so in order to be sure to not miss any transactions, the timestamp is set to <code>1</code> indicating that the entire blockchain will be rescanned.</p>

<p>The <code>importmulti</code> command allows you to specify the timestamp which by default is the time at which you imported the key. However, as mentioned earlier, since the timestamp is needed for rescanning, if it is not set to be early enough, the automatic rescan done at import time will not catch all of the transactions the key is involved in.</p>

<p>If you want to see the timestamps, you can use <code>getaddressinfo</code> to get the information for the address corresponding to the private key you imported. <code>getaddressinfo</code> will give you the timestamp in unix time.</p>

CC BY-SA 4.0
2019-01-21T06:39:40.810Z
We can assume address was added at the time of private key import.. Will it tell me how to get that timestamp? Even if there is no command, I can write my own parser for wallet.dat outside of bitcoind, as long as the data is stored.
Jus12
CC BY-SA 4.0
2019-01-21T06:48:14.987Z
As I said, the timestamp that it stores is not the timestamp of the import. The timestamp of the import is not stored, only the key "birthdate" is stored, and that depends on the import call used and what you specified in the import. It *might* be the timestamp of the import if you used `importmulti`.
Ava Chow
CC BY-SA 4.0
2019-01-21T12:35:04.517Z
It was a fresh wallet and I had used `importprivkey`. What about the timestamp of the corresponding address that I get from `getaddressinfo`? Will that be approximately equal to the timestamp (Unix time) of the private key import?
Jus12
CC BY-SA 4.0
2019-01-21T17:42:44.427Z
No, it will not. There is only one timestamp that is stored for each key (and thus address). That timestamp is the same one I described in my answer and comments.
Ava Chow
CC BY-SA 4.0
2019-01-21T05:07:26.307Z
2019-01-21T05:07:26.307Z
Ava Chow
<p>If we import a private key using <code>bitcoin-cli importprivkey &lt;key&gt;</code>, is there anyway to find out when the import was done?</p>

<p>I am hoping a timestamp is included.</p>

<bitcoin-core><bitcoind><wallet.dat><bitcoin-cli><private-key-import>
Does bitcoind store timestamp at which private key was imported?
Jus12
# Does bitcoind store timestamp at which private key was imported?

(Asked by: username_0 on 2019-01-21)

If we import a private key using `bitcoin-cli importprivkey <key>`, is there anyway to find out when the import was done?

I am hoping a timestamp is included.

**Tags:** bitcoin-core, bitcoind, wallet.dat, bitcoin-cli, private-key-import


---

## 1 answers

### Answer by username_1 on 2019-01-21. Score: 1

No, bitcoind does not. bitcoind does store a timestamp for keys however this timestamp is used to determine when to start rescanning. `importprivkey` does not allow you to specify this timestamp, so in order to be sure to not miss any transactions, the timestamp is set to `1` indicating that the entire blockchain will be rescanned.

The `importmulti` command allows you to specify the timestamp which by default is the time at which you imported the key. However, as mentioned earlier, since the timestamp is needed for rescanning, if it is not set to be early enough, the automatic rescan done at import time will not catch all of the transactions the key is involved in.

If you want to see the timestamps, you can use `getaddressinfo` to get the information for the address corresponding to the private key you imported. `getaddressinfo` will give you the timestamp in unix time.

> **Comments:**
> **username_0**: We can assume address was added at the time of private key import.. Will it tell me how to get that timestamp? Even if there is no command, I can write my own parser for wallet.dat outside of bitcoind, as long as the data is stored.  
> **username_1**: As I said, the timestamp that it stores is not the timestamp of the import. The timestamp of the import is not stored, only the key "birthdate" is stored, and that depends on the import call used and what you specified in the import. It *might* be the timestamp of the import if you used `importmulti`.  
> **username_0**: It was a fresh wallet and I had used `importprivkey`. What about the timestamp of the corresponding address that I get from `getaddressinfo`? Will that be approximately equal to the timestamp (Unix time) of the private key import?  
> **username_1**: No, it will not. There is only one timestamp that is stored for each key (and thus address). That timestamp is the same one I described in my answer and comments.  

---

