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.
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.
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.