Convert & calculate · Unix epoch time
Timestamp converter
Turn a Unix timestamp into a readable date, and back again.
What are you starting from?
A timestamp out of a block, or a date off a calendar.
The number a block, a log or an NFT's expiry date carries.
Automatic treats ten digits as seconds and anything else as milliseconds.
The date behind the number
Paste a timestamp on the left to see it in your local time and in UTC, and how long ago it was.
Right now
Ticking live, straight from this computer's clock.
Starting the clock…
Solidity's block.timestamp is Unix seconds, so a deadline of “one week” is the number above plus 604,800. Most JavaScript, including Date.now(), counts milliseconds instead. That is a thousand times larger, and the usual reason a date lands in 1970 or in the year 55,000.
About this tool
A Unix timestamp, or epoch time, counts the seconds since 00:00:00 UTC on 1 January 1970. Ethereum records block times this way, and it is what block.timestamp returns in Solidity. Paste a timestamp in seconds or milliseconds to see the date in your local time zone, in UTC and in ISO 8601, or pick a date to get the timestamp a contract expects.
Common questions
Is block.timestamp in seconds or milliseconds?
Seconds. Solidity's block.timestamp and the timestamp in every Ethereum block count whole seconds. JavaScript's Date.now() counts milliseconds, so divide by 1,000 before you pass a JavaScript time to a contract.
How does the converter tell seconds from milliseconds?
On Automatic, a 10-digit number is read as seconds and anything else as milliseconds. Change the Counted in setting if your value is an unusual length.
Which time zone are the results in?
Both your own and UTC. A timestamp is shown in your device's local time zone and in UTC, and a date you pick is read in your local time zone.