Convert epoch time to a date and a date to epoch time, in seconds, milliseconds, microseconds or nanoseconds and any time zone
Current Unix time, seconds
1794449777
Current Unix time, milliseconds
1794449777000
This forex trading week as Unix timestamps: opens 1794175200, closes 1794607200 (17:00 New York)
Forex market hoursUnix time in code
Get the current time and convert both ways. The examples use the value above
// Current Unix time in seconds
Math.floor(Date.now() / 1000)
// Unix time to date
new Date(1794449777 * 1000).toISOString()
// Date to Unix time
Date.parse("2026-11-12T02:16:17Z") / 1000Notable timestamps
| 0 | 1970-01-01 00:00:00 UTCThe Unix epoch |
| -1 | 1969-12-31 23:59:59 UTCOne second before the epoch |
| 1000000000 | 2001-09-09 01:46:40 UTCOne billion seconds |
| 1234567890 | 2009-02-13 23:31:30 UTCThe digits in order |
| 2000000000 | 2033-05-18 03:33:20 UTCTwo billion seconds |
| 2147483647 | 2038-01-19 03:14:07 UTCLast second of signed 32-bit time |
Units by number of digits
For timestamps from 2001 to 2286
| Digits | Unit | Example |
|---|---|---|
| 10 | Seconds | 1793967600 |
| 13 | Milliseconds | 1793967600000 |
| 16 | Microseconds | 1793967600000000 |
| 19 | Nanoseconds | 1793967600000000000 |
Time spans in seconds
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 30 days | 2,592,000 |
| 365 days | 31,536,000 |
| Average Gregorian year | 31,556,952 |
What it reads
- Timestamps in any unit, negative or with a fraction, with or without separators such as 1,793,967,600
- ISO 8601 and RFC 3339 dates, with Z, an offset or a zone in brackets as RFC 9557 writes it
- RFC 2822 and HTTP dates, and the output of JavaScript's Date.toString()
- Dates in words, such as 6 Nov 2026 2:30 pm or Nov 6, 2026
- Slash dates in your date format; when the order is unclear, a note lets you swap day and month
- Relative times: now, today, tomorrow, in 3 days, 2 hours ago, +90 minutes
- A zone name after the date, such as 2026-11-06 09:30 Europe/London
Dates without an offset are read in the zone you choose. Unix time does not count leap seconds, so 23:59:60 is read as the next second.
Frequently asked questions
What is a Unix timestamp?
The number of seconds since 00:00:00 UTC on 1 January 1970, the Unix epoch, not counting leap seconds. It is the same everywhere in the world at a given moment, so it has no time zone. Times before 1970 are negative.
How do I tell seconds from milliseconds?
By the number of digits. A current timestamp has 10 digits in seconds, 13 in milliseconds, 16 in microseconds and 19 in nanoseconds. The converter picks the unit from the length and you can override it.
What happens to times that clocks skip or repeat?
When clocks go forward, a range of local times never happens, such as 02:30 in New York on 8 March 2026. The converter reads it with the offset from before the change, so 02:30 becomes 03:30 EDT. When clocks go back, a range happens twice; it shows the earlier one and lets you pick the later.
Why does EST or BST not work as a time zone?
Abbreviations are ambiguous: IST is used in India, Ireland and Israel, and CST in the US, China and Cuba. Use an offset such as -05:00 or a zone name such as America/New_York. Zone names also follow clock changes.
What is the year 2038 problem?
Systems that store Unix time as a signed 32-bit number run out at 2147483647, which is 03:14:07 UTC on 19 January 2038. The next second wraps to December 1901. 64-bit time does not have this limit.
Is there an API for this?
Yes. GET /api/v2/time/convert and /api/v2/time/now return the same conversions as JSON, free and with no key. See marketcalendars.com/docs/api/convert-time. To check whether a market was open at a timestamp, add at= to the status endpoint.
Related: 24-hour market timeline, world market map and thetime conversion API