RaveToolsTimestamp Converter

What is 0 in date?

The Unix timestamp 0 is Thu, Jan 01, 1970, 00:00:00 UTC (the unix epoch). Convert it to ISO 8601, UTC, your local time and back below. 100% in your browser.

The timestamp 0 explained

Timestamp 0 is the epoch itself: the instant every Unix timestamp is counted from. Each positive number is that many seconds after it, and each negative number is a moment before it, so -1 is 31 December 1969, 23:59:59 UTC.

The date is a convention, not an event. The first Unix manual (1971) counted sixtieths of a second from 1 January 1971, which would have filled a 32-bit counter in a little over two years. The count was switched to whole seconds and the start moved to a round, recent date: 1 January 1970.

In practice 0 is the classic sign of a missing value. When a null or unset date is stored as 0 and then displayed, an app shows "1 January 1970" - or "31 December 1969" for anyone west of Greenwich, because local time there is still the evening before. If you see either date in your data, the timestamp was most likely never set.

0 in every format

  • Unix seconds0
  • Unix milliseconds0
  • ISO 86011970-01-01T00:00:00.000Z
  • RFC 2822 (UTC)Thu, 01 Jan 1970 00:00:00 GMT

How it works

A Unix timestamp is a single number: seconds counted from 1 January 1970, 00:00 UTC. Below is one of them, 0, run through this converter's own code, and the three ways it goes wrong in real systems.

01

Units: count the digits first

A timestamp doesn't say what it counts. The same moment is 10 digits in seconds and 19 in nanoseconds, and every extra group of three is just more precision. The converter reads the unit from the length: up to 11 digits seconds, 12-14 milliseconds, 15-17 microseconds, 18 and up nanoseconds. 0 is too short to split into digit groups, so this chapter uses a typical 10-digit value, 1700000000.

170000000010 digits → secondsTue, Nov 14, 2023, 22:13:20 UTC170000000000013 digits → millisecondsTue, Nov 14, 2023, 22:13:20 UTC170000000000000016 digits → microsecondsTue, Nov 14, 2023, 22:13:20 UTC170000000000000000019 digits → nanosecondsTue, Nov 14, 2023, 22:13:20 UTC

Read in the wrong unit

The number is fine; the reading is not. Two everyday mistakes put the same moment half a century too early or tens of thousands of years too late.

  1. 1Right unitread as secondsnew Date(1700000000 * 1000)→ Tue, Nov 14, 2023, 22:13:20 UTCSeconds, read as seconds.
  2. 2Wrong unitread as millisecondsnew Date(1700000000)→ Tue, Jan 20, 1970, 16:13:20 UTCJavaScript Date wants milliseconds. Hand it seconds and a 2023 moment lands in January 1970.
  3. 3Wrong unitread as secondsDate.now() saved as seconds→ Sun, Nov 08, 55840, 22:13:20 UTCDate.now() is milliseconds. Store it where seconds belong and the date runs off the calendar.
02

Timezones: one number, every clock

The number has no timezone. It names one instant for the whole planet, and a timezone only decides how that instant is printed. This strip runs live on the real current Unix time: when the number ticks, every clock ticks with it.

Unix time0
  • Los AngelesUTC-8Wed, Dec 31, 1969, 16:00:00 PST
  • New YorkUTC-5Wed, Dec 31, 1969, 19:00:00 EST
Wed 31 Dec
  • UTCUTC+0Thu, Jan 01, 1970, 00:00:00 UTC
  • WarsawUTC+1Thu, Jan 01, 1970, 01:00:00 GMT+1
  • KolkataUTC+5:30Thu, Jan 01, 1970, 05:30:00 GMT+5:30
  • TokyoUTC+9Thu, Jan 01, 1970, 09:00:00 GMT+9
  • AucklandUTC+12Thu, Jan 01, 1970, 12:00:00 GMT+12
Thu 1 Jan

At 0: 2 on Wed 31 Dec, 5 on Thu 1 Jan.

For most of the day the strip spans two calendar dates: a city past its local midnight is already on the next day, while the number is the same for all of them. Kolkata runs on UTC+5:30, which is why its minute hand is the odd one out. When two systems disagree about a date, compare the numbers, not the strings.

03

Year 2038: when the counter runs out of bits

Lots of software keeps the count in a signed 32-bit integer. One bit holds the sign, 31 hold the value, and the biggest number that fits is 2147483647. One second past it, the count wraps around.

Signed 32-bit counterAll 31 value bits full: the last second that fits
2147483647= Tue, Jan 19, 2038, 03:14:07 UTC

2147483647 = Tue, Jan 19, 2038, 03:14:07 UTC. -2147483648 = Fri, Dec 13, 1901, 20:45:52 UTC.

Everything a signed 32-bit counter can hold
0
13 Dec 1901-21474836481 Jan 1970019 Jan 20382147483647

Negative numbers are dates before 1970. 0 sits exactly at the epoch, the middle of the range; the striped stretch is the 68 years the forward half can count.

292,277,026,596year a 64-bit counter runs out

Current 64-bit systems keep time in 64 bits and are safe. The 2038 limit lives on wherever the count is still squeezed into 32: old embedded devices, binary file formats, a signed INT column. MySQL's TIMESTAMP type still ends at 19 Jan 2038. This converter is not affected: JavaScript keeps time as a 64-bit float and a Date reaches the year 275,760.

Related timestamps

Frequently Asked Questions

About Unix timestamps, epoch time and this converter.

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970, not counting leap seconds. It is a simple, timezone-independent integer, which is why logs, databases, APIs and JWT "exp"/"nbf" claims store time this way.

By digit count. A current timestamp in seconds is about 10 digits (e.g. 1751800000), milliseconds is 13 digits, microseconds 16, and nanoseconds 19. This converter auto-detects the unit from the length of the number you paste, so you rarely have to pick one manually.

Paste the epoch number into the "Epoch to date" field. The tool detects the unit, then shows the moment in your local timezone, in UTC, and as ISO 8601, RFC 2822 and a relative "x ago" string. Every result has a copy button.

Use the "Date to epoch" field to pick a date and time (or paste an ISO string). The converter returns the value in both seconds and milliseconds, ready to copy. You choose whether your input is interpreted in local time or UTC.

A Unix timestamp itself has no timezone - it is an absolute point in time counted from the UTC epoch. Timezones only matter when you display it as a human-readable date. This tool shows the same instant side by side in your local zone, in UTC, and in any IANA timezone you select.

Systems that store the timestamp in a signed 32-bit integer can only count up to 2,147,483,647 seconds, which is reached at 03:14:07 UTC on 19 January 2038. After that the value overflows. Modern systems use 64-bit integers, which push the limit hundreds of billions of years into the future.

No. Every conversion runs entirely in your browser using the native Intl and Date APIs. No timestamps, dates or timezones are uploaded, logged or stored on a server.