Hi, is there any way to back out a human readable time (e.g., 01-20-2022 8:21:13pm PST) from the round-time parameter from the indexer?
Algorand Developer Docs, SDKs, REST APIs, CLI tools, ecosystem projects, metrics dashboard and sample code, how-tos, and news from the Algorand developer community
For example, I get “1641070304” as the value for the ‘round-time’ on a specific transaction. What would this correspond to in the real world?
1 Like
fabrice
January 20, 2022, 11:20pm
2
The round time is a UNIX timestamp.
Most time/date libraries from most languages allow such conversions.
You can also google it and find websites that allow for such conversion.
Thanks for the quick reply!
ismax
June 20, 2022, 3:28pm
4
For others having same issue, here is the Python code to convert the round-time
in the transaction json to a datetime object :
from datetime import datetime
ts = int(tx['round-time'])
print(datetime.utcfromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S'))
1 Like