How can I get the current time in Solidity. I don't need the current block's time given by now
and block.timestamp
, but rather the actual current time.
Thank you for your help!
soliditytimestamp
How can I get the current time in Solidity. I don't need the current block's time given by now
and block.timestamp
, but rather the actual current time.
Thank you for your help!
Best Answer
Within the Ethereum Virtual Machine, there isn't a way to get the current time, other than the block time. So there is no way to get it in Solidity.
Why?
There is disagreement between computers about what the current time is, and Ethereum needs to run every transaction with exactly the same outcome on every node.
What next?
Outline what you're trying to accomplish and ask about that.