Bitcoin Forum
May 03, 2024, 06:22:11 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to convert a Bitcoin Core "timesmart" into human-readable format?  (Read 235 times)
walletrecovery (OP)
Copper Member
Member
**
Offline Offline

Activity: 414
Merit: 29


View Profile WWW
January 15, 2022, 10:27:02 AM
Last edit: January 18, 2022, 01:14:11 PM by walletrecovery
 #1

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://bitcointalk.org/index.php?topic=5381925.0

1714717331
Hero Member
*
Offline Offline

Posts: 1714717331

View Profile Personal Message (Offline)

Ignore
1714717331
Reply with quote  #2

1714717331
Report to moderator
1714717331
Hero Member
*
Offline Offline

Posts: 1714717331

View Profile Personal Message (Offline)

Ignore
1714717331
Reply with quote  #2

1714717331
Report to moderator
1714717331
Hero Member
*
Offline Offline

Posts: 1714717331

View Profile Personal Message (Offline)

Ignore
1714717331
Reply with quote  #2

1714717331
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7340


Farewell, Leo


View Profile
January 15, 2022, 10:36:09 AM
 #2

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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7452


Crypto Swap Exchange


View Profile
January 15, 2022, 12:03:49 PM
Merited by o_e_l_e_o (4), Quickseller (2), BlackHatCoiner (1)
 #3

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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
January 15, 2022, 01:02:43 PM
 #4

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?

...

walletrecovery (OP)
Copper Member
Member
**
Offline Offline

Activity: 414
Merit: 29


View Profile WWW
January 15, 2022, 03:44:58 PM
Last edit: January 15, 2022, 04:15:00 PM by walletrecovery
 #5

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)

walletrecovery (OP)
Copper Member
Member
**
Offline Offline

Activity: 414
Merit: 29


View Profile WWW
January 15, 2022, 03:47:08 PM
Last edit: January 15, 2022, 04:14:27 PM by walletrecovery
 #6

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.

walletrecovery (OP)
Copper Member
Member
**
Offline Offline

Activity: 414
Merit: 29


View Profile WWW
January 15, 2022, 03:50:54 PM
Last edit: January 15, 2022, 04:12:23 PM by walletrecovery
 #7

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?

Quickseller
Copper Member
Legendary
*
Offline Offline

Activity: 2870
Merit: 2298


View Profile
January 16, 2022, 05:33:22 AM
 #8

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)
walletrecovery (OP)
Copper Member
Member
**
Offline Offline

Activity: 414
Merit: 29


View Profile WWW
January 16, 2022, 10:05:37 AM
 #9

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!

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!