Unix timestamp converter
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
Current Unix time, milliseconds
Result
- Unix time (seconds)1000944000
- Milliseconds1000944000000
- Microseconds1000944000000000
- Nanoseconds1000944000000000000
- ISO 8601 in UTC2001-09-20T00:00:00Z
- ISO 8601 in UTC2001-09-20T00:00:00+00:00
- RFC 9557 with zone2001-09-20T00:00:00+00:00[UTC]
- RFC 2822 (email)Thu, 20 Sep 2001 00:00:00 +0000
- SQL timestamp in UTC2001-09-20 00:00:00
- Readable in UTCThu 20 Sep 2001, 00:00:00 UTC
- Relative to now25 years 1 month ago
- CalendarThursday, week 2001-W38, day 263 of the year
Time zones
UTC
Thu 20 Sep 2001, 00:00:00
UTC
UTC+00:00
New York, United States
Wed 19 Sep 2001, 20:00:00
EDT
UTC-04:00 summer
London, United Kingdom
Thu 20 Sep 2001, 01:00:00
BST
UTC+01:00 summer
Tokyo, Japan
Thu 20 Sep 2001, 09:00:00
UTC+09:00
Markets at this moment
All markets on 20 Sep 2001- NYSE
Outside trading hours
ClosedPre-market at 04:00 on Thu 20 Sep
- Nasdaq
Outside trading hours
ClosedPre-market at 04:00 on Thu 20 Sep
- LSE
Outside trading hours
ClosedOpen at 08:00
- Xetra
Outside trading hours
ClosedOpen at 09:00
- TSE Tokyo
Regular session
OpenLunch break at 11:30
- HKEX
Outside trading hours
ClosedOpen at 10:00
This forex trading week as Unix timestamps: opens 1793570400, closes 1794002400 (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(1000944000 * 1000).toISOString()
// Date to Unix time
Date.parse("2001-09-20T00:00:00Z") / 1000from datetime import datetime, timezone
import time
# Current Unix time in seconds
int(time.time())
# Unix time to date
datetime.fromtimestamp(1000944000, tz=timezone.utc).isoformat()
# Date to Unix time
int(datetime.fromisoformat("2001-09-20T00:00:00+00:00").timestamp())// Current Unix time in seconds
time.Now().Unix()
// Unix time to date
time.Unix(1000944000, 0).UTC().Format(time.RFC3339)
// Date to Unix time
t, _ := time.Parse(time.RFC3339, "2001-09-20T00:00:00Z")
t.Unix()// Current Unix time in seconds
Instant.now().getEpochSecond()
// Unix time to date
Instant.ofEpochSecond(1000944000L).toString()
// Date to Unix time
Instant.parse("2001-09-20T00:00:00Z").getEpochSecond()// Current Unix time in seconds
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
// Unix time to date
DateTimeOffset.FromUnixTimeSeconds(1000944000).ToString("o")
// Date to Unix time
DateTimeOffset.Parse("2001-09-20T00:00:00Z").ToUnixTimeSeconds()// Current Unix time in seconds (std)
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs()
// Unix time to date (chrono 0.4.31 or later)
DateTime::from_timestamp(1000944000, 0).unwrap().to_rfc3339()
// Date to Unix time (chrono)
DateTime::parse_from_rfc3339("2001-09-20T00:00:00Z").unwrap().timestamp()// Current Unix time in seconds
time();
// Unix time to date
gmdate('c', 1000944000);
// Date to Unix time
strtotime('2001-09-20T00:00:00Z');require "time"
# Current Unix time in seconds
Time.now.to_i
# Unix time to date
Time.at(1000944000).utc.iso8601
# Date to Unix time
Time.iso8601("2001-09-20T00:00:00Z").to_i-- Current Unix time in seconds
SELECT floor(extract(epoch FROM now()))::bigint;
-- Unix time to date
SELECT to_timestamp(1000944000) AT TIME ZONE 'UTC';
-- Date to Unix time
SELECT extract(epoch FROM timestamptz '2001-09-20T00:00:00Z')::bigint;-- FROM_UNIXTIME and UNIX_TIMESTAMP use the session time zone
SET time_zone = '+00:00';
-- Current Unix time in seconds
SELECT UNIX_TIMESTAMP();
-- Unix time to date
SELECT FROM_UNIXTIME(1000944000);
-- Date to Unix time
SELECT UNIX_TIMESTAMP('2001-09-20 00:00:00');-- unixepoch() needs SQLite 3.38 or later
-- Current Unix time in seconds
SELECT unixepoch();
-- Unix time to date
SELECT datetime(1000944000, 'unixepoch');
-- Date to Unix time
SELECT unixepoch('2001-09-20 00:00:00');# Current Unix time in seconds
date +%s
# Unix time to date
date -u -d @1000944000 +%Y-%m-%dT%H:%M:%SZ
# Date to Unix time
date -u -d "2001-09-20T00:00:00Z" +%s# Current Unix time in seconds
date +%s
# Unix time to date
date -u -r 1000944000 +%Y-%m-%dT%H:%M:%SZ
# Date to Unix time
date -u -j -f "%Y-%m-%dT%H:%M:%SZ" "2001-09-20T00:00:00Z" +%s# Current Unix time in seconds
[DateTimeOffset]::UtcNow.ToUnixTimeSeconds()
# Unix time to date
[DateTimeOffset]::FromUnixTimeSeconds(1000944000).UtcDateTime
# Date to Unix time
[DateTimeOffset]::Parse("2001-09-20T00:00:00Z").ToUnixTimeSeconds()Unix time to date (UTC), with the cell formatted as a date and time
=1000944000/86400+DATE(1970,1,1)
Date in A1 (UTC) to Unix time
=(A1-DATE(1970,1,1))*86400
Excel has no time zones: NOW() is local time, so subtract your UTC offset
=(NOW()-DATE(1970,1,1))*86400Notable 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