I'm looking to use block.timestamp
in one of my contracts and I want to know whether the block.timestamp
is seconds like in Python or milliseconds like in Java or some other value?
Also, is it safe to use block.timestamp
to check if 30 days is past since the last updated time or something like that?
Best Answer
From the Solidity documentation (here and here):
For your other question:
Your question isn't completely clear, but assuming you're questioning the validity of a timestamp over a given period of time, then this previous answer should cover it: Is block.timestamp safe for longer time periods?