Author

Topic: Is it possible to convert a Bitcoin Core "timesmart" into human-readable format? (Read 236 times)

copper member
Activity: 414
Merit: 29
Thanks Sir! Could you teach me how to use this tool, i need a simple software that can convert a number into human-readable format?
[/quote]

What i showed is only simple example of Python 3 (programming language) library. If you're looking for user-friendly/ready-to-use tool, you might want to use website such as https://timestamp.online/.
[/quote]

Thank you, you are a genius. I wish you good luck, happiness and a lot of money!
copper member
Activity: 2870
Merit: 2298
According to https://github.com/bitcoin/bitcoin/blob/v22.0/src/wallet/transaction.h#L108-L117, "timesmart" uses timestamp. So all you need to do is finding or create script which convert timestamp to human-readable format (such as Date/Time).

Code:
>>> # Simple example with Python 3
>>> from datetime import datetime
>>> datetime.fromtimestamp(1613256165).isoformat()
2021-02-13T17:42:45
>>> from time import ctime
>>> ctime(1613256165)
'Sat Feb 13 17:42:45 2021

Thanks Sir! Could you teach me how to use this tool, i need a simple software that can convert a number into human-readable format?
It appears the "timesmart" entries are timestamps of your transactions.
Below is a simple function based on ETFbitcoin's code that you can insert into your program:
Code:
from time import ctime
def timesmart2humanReadable(timesmart)
    return ctime(timesmart)
copper member
Activity: 414
Merit: 29
According to https://github.com/bitcoin/bitcoin/blob/v22.0/src/wallet/transaction.h#L108-L117, "timesmart" uses timestamp. So all you need to do is finding or create script which convert timestamp to human-readable format (such as Date/Time).

Code:
>>> # Simple example with Python 3
>>> from datetime import datetime
>>> datetime.fromtimestamp(1613256165).isoformat()
2021-02-13T17:42:45
>>> from time import ctime
>>> ctime(1613256165)
'Sat Feb 13 17:42:45 2021

Thanks Sir! Could you teach me how to use this tool, i need a simple software that can convert a number into human-readable format?
copper member
Activity: 414
Merit: 29
For example, if you open "wallet.dat" file (for example Notepad++)
we will see "timesmart 1613256165" and my question Is it possible
to convert a Bitcoin Core "timesmart" into human-readable format?


seconds since epoch?

...

This value is probably somehow related to transactions and a converter is needed to analyze wallet files for their check genuine or not.
copper member
Activity: 414
Merit: 29
Why would you want to convert your wallet.dat into human-readable format? It contains information that makes it difficult to write down with no mistakes, such as your transactions etc., even if it was encoded into a seed phrase. For instance, if it's 1MB then you need to encode those 1 million bytes (= 4 million bits) into a seed phrase. With a quick calculation it's 4,000,000 / 11 = 363,636 words.

I can't find this timesmart value you're saying when I open my wallet.dat. Where exactly is it? I can't read anything from my wallet file as it's not readable from text editors.

Keyword search will help you (see screenshot)
legendary
Activity: 1946
Merit: 1427
For example, if you open "wallet.dat" file (for example Notepad++)
we will see "timesmart 1613256165" and my question Is it possible
to convert a Bitcoin Core "timesmart" into human-readable format?


seconds since epoch?

...
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
According to https://github.com/bitcoin/bitcoin/blob/v22.0/src/wallet/transaction.h#L108-L117, "timesmart" uses timestamp. So all you need to do is finding or create script which convert timestamp to human-readable format (such as Date/Time).

Code:
>>> # Simple example with Python 3
>>> from datetime import datetime
>>> datetime.fromtimestamp(1613256165).isoformat()
2021-02-13T17:42:45
>>> from time import ctime
>>> ctime(1613256165)
'Sat Feb 13 17:42:45 2021
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Why would you want to convert your wallet.dat into human-readable format? It contains information that makes it difficult to write down with no mistakes, such as your transactions etc., even if it was encoded into a seed phrase. For instance, if it's 1MB then you need to encode those 1 million bytes (= 4 million bits) into a seed phrase. With a quick calculation it's 4,000,000 / 11 = 363,636 words.

I can't find this timesmart value you're saying when I open my wallet.dat. Where exactly is it? I can't read anything from my wallet file as it's not readable from text editors.
copper member
Activity: 414
Merit: 29
For example, if you open "wallet.dat" file (for example Notepad++)
we will see "timesmart 1614347716" and my question Is it possible
to convert a Bitcoin Core "timesmart" into human-readable format?



Also see topic: https://bitcointalksearch.org/topic/is-it-possible-to-convert-a-part-of-hash-string-into-human-readable-format-5381925
Jump to: