Solidity provides the uint256
now
or block.timestamp
Special Variable.
How can I convert between this Solidity timestamp and year/month/day hour:minute:second?
Solidity provides the uint256
now
or block.timestamp
Special Variable.
How can I convert between this Solidity timestamp and year/month/day hour:minute:second?
Warning - Self Promotion
There are a few libraries that provide the functionality to perform the conversions between the timestamp and year/month/day hour:minute:second including:
And now there is @bokkypoobah's Gas-Efficient Solidity DateTime Library. More information about it in this medium post.