Skip to content
DailyCalc

Unix Timestamp Converter

Converts epoch time to a readable date and back, detecting seconds, milliseconds or microseconds.

Last updated

Your details

Seconds, milliseconds or microseconds — the magnitude decides.

Result

UTC
Tue, 14 Nov 2023 22:13:20 GMT

Read as seconds since the epoch

ISO 8601
2023-11-14T22:13:20.000Z
Local time
11/14/2023, 10:13:20 PM

In your own timezone

Day of the week
Tuesday
In seconds
1700000000

In milliseconds, 1700000000000

1700000000, read as seconds…

date = epoch + t

The epoch is 1970-01-01 00:00:00 UTC

Ten digits means seconds

Tue, 14 Nov 2023 22:13:20 GMT

Formula — written step by step

Timestamp 1700000000…

date = 1970-01-01 00:00:00 UTC + t seconds

Ten digits, so the unit is seconds

1,700,000,000 ÷ 86,400 = 19,675.9 days

19,675 whole days after 1 Jan 1970

Tue, 14 Nov 2023 22:13:20 GMT

Unix time counts seconds since the epoch, ignoring leap seconds. A ten-digit value is seconds, thirteen is milliseconds, and sixteen is microseconds — reading one as another puts the answer out by a factor of a thousand.

A worked example

The bug that puts everything in 1970

A JavaScript timestamp
1700000000000
Read as seconds instead
1,700,000,000,000 s
  1. As milliseconds: 14 Nov 2023
  2. As seconds: 1,700,000,000,000 ÷ 31,556,952
  3. = about 53,871 years
  4. The date lands in the year 55840

A factor-of-1000 error, not a small one

JavaScript’s Date.now() returns milliseconds; almost every other language returns seconds. Passing one to the other is the single most common epoch bug, and it never fails quietly — the date is either in 1970 or tens of thousands of years away. This converter detects which you meant from the magnitude.

How to use this calculator

  1. Paste a timestamp and the converter works out whether it is in seconds, milliseconds or microseconds from its size.
  2. Read the UTC row for the canonical answer and the local row for your own timezone.
  3. Switch the mode to go the other way, entering a UTC date and time.
  4. The ISO 8601 row is the format to use when storing or transmitting a date as text.

What Unix time counts

Unix time is the number of seconds elapsed since 1 January 1970 at 00:00:00 UTC, a moment called the epoch. It is the standard way computers store an instant, because it is a single number with no timezone, no calendar and no ambiguity about formatting.

It deliberately ignores leap seconds. Every day is treated as exactly 86,400 seconds, which means Unix time is not quite the true count of elapsed seconds — but it does guarantee that converting back to a date always gives the same answer, which matters more in practice.

Seconds, milliseconds, and the factor of a thousand

Most languages return seconds. JavaScript and Java return milliseconds. Mixing them is the most common bug involving timestamps, and it produces spectacularly wrong dates rather than subtly wrong ones — either 1970 or the year 55840.

The length of the number is a reliable tell. A ten-digit value is seconds, thirteen is milliseconds and sixteen is microseconds, and this converter uses that to interpret what you paste. When writing code, the safer habit is to name the variable for its unit.

The year 2038 problem

Unix time was traditionally stored in a signed 32-bit integer, which overflows on 19 January 2038 at 03:14:07 UTC. A second later, the counter wraps to a large negative number and the date becomes December 1901.

Most modern systems have moved to 64-bit timestamps, which push the limit some 292 billion years out. The risk now lives in embedded devices, old file formats and database columns that were never widened — which is why 2038 remains a real migration task rather than a curiosity.

Formula & methodology

Unix time is the count of seconds since 1970-01-01T00:00:00Z, ignoring leap seconds. The unit is inferred from magnitude: ten digits is seconds, thirteen milliseconds, sixteen microseconds.

What this calculator assumes

  • Every day is treated as exactly 86,400 seconds, so Unix time is not the true count of elapsed SI seconds — it currently differs by around 27 seconds since 1972.
  • The unit heuristic is reliable for modern dates but would misread a genuine ten-digit millisecond timestamp, which corresponds to 1970.
  • Values are handled in a 64-bit float, so timestamps far outside the representable date range are rejected rather than silently wrapped.

Sources

  1. IEEE Std 1003.1 (POSIX.1-2017), Base Definitions, section 4.16 Seconds Since the Epoch, The Open Group, 2018.

Recognising the unit by length

DigitsUnitExampleUsed by
10Seconds1700000000Unix, PHP, Python, Go, most APIs
13Milliseconds1700000000000JavaScript, Java
16Microseconds1700000000000000Python time_ns, some databases

Ten-digit seconds cover 2001 to 2286, so any modern timestamp of ten digits is seconds. This heuristic only fails for dates far outside normal use.

Frequently asked questions

Why does my timestamp give a date in 1970?

You are almost certainly passing milliseconds to something expecting seconds, or the value is very small. Dividing a 13-digit value by 1000 usually fixes it.

Does Unix time account for timezones?

No, and that is its main virtue. A timestamp is a single instant in UTC. The timezone is applied only when it is formatted for display.

Does it include leap seconds?

No. Every day is treated as exactly 86,400 seconds, so Unix time drifts slightly from true elapsed time — currently by about 27 seconds since 1972.

Can a timestamp be negative?

Yes. Negative values are instants before 1970, so −86400 is 31 December 1969.