Skip to main content
Toolsunix-timestamp-converter8 min read

Unix time explained: seconds since 1970 and the 2038 limit

What a Unix timestamp counts, how to tell seconds from milliseconds by digit count, and the exact 2038, 2036 and 2106 overflow dates worked out step by step.

Published

Cover banner: Unix time explained: seconds since 1970 and the 2038 limit, with the free Unix Timestamp Converter

Unix time is the number of seconds since 00:00:00 UTC on 1 January 1970, counting every day as exactly 86,400 seconds. Stored as a signed 32-bit integer it tops out at 2,147,483,647, which is 03:14:07 UTC on 19 January 2038. One second later the counter overflows and wraps back to December 1901.

This guide works through the milestones, the seconds-versus-milliseconds confusion and the exact arithmetic behind 2038, plus the lesser-known 2036 and 2106 limits. Every timestamp-to-date conversion in this article was produced by the parsing code inside AltFTool's Unix timestamp converter, so you can paste any of the numbers and get the same answer.

What a Unix timestamp actually counts

A timestamp is a single number with no time zone attached. Zero is the epoch, 1970-01-01T00:00:00Z. Positive numbers are later, negative numbers earlier: -1 is 23:59:59 UTC on 31 December 1969. The IETF's JSON Web Token standard (RFC 7519) gives a precise definition, which it says is equivalent to the POSIX "Seconds Since the Epoch": seconds from 1970-01-01T00:00:00Z UTC, ignoring leap seconds, with each day accounted for by exactly 86,400 seconds.

"Ignoring leap seconds" matters. When a leap second is inserted into UTC, Unix time does not count it, so a Unix timestamp is not a true count of elapsed SI seconds. In exchange, converting a timestamp to a calendar date is pure arithmetic: divide by 86,400 to get days, and the remainder is the time of day in UTC. Your local time is applied only when the number is displayed.

Timestamp (seconds)UTC date and timeWhy it is notable
01970-01-01 00:00:00The epoch
1,000,000,0002001-09-09 01:46:40First 10-digit timestamp
1,234,567,8902009-02-13 23:31:30The "1234567890" moment
1,794,528,0002026-11-13 00:00:00The day this article was written
2,000,000,0002033-05-18 03:33:20Two billion seconds
2,147,483,6472038-01-19 03:14:07Largest signed 32-bit value
Every date computed with the Unix timestamp converter's parser on 13 November 2026.

Seconds, milliseconds or nanoseconds? Count the digits

The most common timestamp bug is a unit mix-up. Unix time is defined in seconds, while JavaScript uses milliseconds: MDN's documentation for Date.now() says it returns the number of milliseconds elapsed since the epoch. Other systems log microseconds or nanoseconds. The same instant can therefore appear as four very different numbers.

Value pastedDigitsRead asUTC result
179452800010seconds2026-11-13 00:00:00
179452800000013milliseconds2026-11-13 00:00:00
179452800000000016microseconds2026-11-13 00:00:00
179452800000000000019nanoseconds2026-11-13 00:00:00
Units inferred by the converter's digit rule: up to 10 digits seconds, 11–13 milliseconds, 14–16 microseconds, 17 or more nanoseconds.

Counting digits works because, for present-day dates, each unit lands in its own length band. The rule has edges you should know about. Any value of 10 digits or fewer is treated as seconds, and the largest 10-digit number, 9,999,999,999, is 17:46:39 UTC on 20 November 2286. Beyond that, seconds need 11 digits and a digit-count guess would misread them as milliseconds. A seconds value for the year 9999, such as 253,402,300,799, is 12 digits long, so it is read as milliseconds and lands in January 1978. If you know your unit, trust that over any automatic guess.

Unix Timestamp Converter

Paste a timestamp in seconds, milliseconds, microseconds or nanoseconds and see it in UTC, local time and ISO 8601.

Open Unix Timestamp Converter

The 2038 problem, worked out exactly

A signed 32-bit integer uses one bit for the sign and 31 for the value, so its range is −2,147,483,648 to 2,147,483,647 (that is, 231 − 1). Software that keeps Unix time in such a field can count forward only to 2,147,483,647 seconds after the epoch.

ValueInterpretationUTC date
2,147,483,647Last second a signed 32-bit counter can hold2038-01-19 03:14:07
2,147,483,648What the next second should be2038-01-19 03:14:08
−2,147,483,648What a 32-bit counter actually wraps to1901-12-13 20:45:52
4,294,967,295Largest unsigned 32-bit value2106-02-07 06:28:15
Computed with the Unix timestamp converter's parser.

The failure is not a crash at a magic moment but a silent jump of about 136 years backwards. Certificates appear expired or not yet valid, scheduled jobs fire at the wrong time, and "time since" calculations turn hugely negative. Treating the field as unsigned postpones the problem to February 2106 but breaks every date before 1970. The durable fix is a 64-bit count, which pushes the limit far beyond any practical horizon.

You can already meet 2038 today. Any calculation that looks more than about 11 years ahead, such as a 15-year certificate, a long mortgage schedule or a far-future expiry stored as a 32-bit integer, crosses the boundary now, not in 2038. Searching your code and database schemas for 32-bit time fields is worth doing well before the deadline.

Other limits: 2036, 2286 and the year 275760

Not every clock counts from 1970. The Network Time Protocol (RFC 5905) counts unsigned 32-bit seconds from 1 January 1900, so its era 0 ends when that counter wraps. The difference between the two epochs is 2,208,988,800 seconds, and adding 232 seconds to 1900 gives 06:28:16 UTC on 7 February 2036; RFC 5905 lists 8 February 2036 as the first day of NTP era 1. NTP was designed to handle the rollover using era numbers, but simple clients that assume era 0 may not.

JavaScript has a much larger limit. MDN explains that a Date holds up to ±8,640,000,000,000,000 milliseconds (±100,000,000 days) relative to the epoch, from 20 April 271821 BC to 13 September 275760 AD. Anything outside that range becomes an Invalid Date. It is a theoretical limit, but it explains why converting an absurdly large number of seconds sometimes gives no result at all.

And as noted above, 20 November 2286 is when second-based timestamps grow to 11 digits, which will break any tool, log parser or spreadsheet formula that guesses units by length.

Time zones and ISO 8601

Because a timestamp has no zone, two people in Mumbai and London who convert 1794528000 see different local times (05:30 and 00:00) for the same instant. Store and compare timestamps in UTC, and convert to local time only at the edge where a person reads it. When you need a readable form in logs or APIs, an ISO 8601 string with an explicit offset, such as 2026-11-13T00:00:00Z, avoids the ambiguity.

When a log or CSV export mixes units, converting rows one at a time is slow and error-prone. The batch timestamp conversion tool converts a whole column at once and detects each row's unit by its digit count, so a column that mixes seconds and milliseconds converts correctly in one pass. Tokens are another common place to meet timestamps: the exp and iat claims in a JWT are Unix seconds, which the JWT decoder shows as dates.

Frequently asked questions

The epoch is a convention: 00:00:00 UTC on 1 January 1970 was chosen as zero, and the POSIX and RFC 7519 definitions both count from it. Dates before it are simply negative numbers.

Neither, strictly: it is a count of seconds from a fixed UTC instant, so it has no time zone. It shows as UTC or local time only when it is converted to a calendar date.

That is 2,147,483,647 seconds after the epoch, the largest value a signed 32-bit integer can hold. Software storing time that way overflows one second later and reads the next value as 20:45:52 UTC on 13 December 1901.

A 64-bit time value does not overflow in 2038, but safety depends on every place the time is stored or sent. A 32-bit database column, file format or protocol field still breaks even on a 64-bit machine.

It was almost certainly read in the wrong unit. A seconds value read as milliseconds lands within days or months of 1 January 1970; check whether the number should have 10 or 13 digits.

No. RFC 7519 defines the count as ignoring leap seconds, with every day exactly 86,400 seconds, so a timestamp is not a precise count of elapsed SI seconds across a leap second.

Sources and notes

Links the author listed for this post.

  1. 1
  2. 2
  3. 3
  4. 4

Reader feedback

Was this guide helpful?

Your signal helps the editorial team improve stale or unclear guides faster.

Share this article

Written by

Every timestamp-to-date conversion in this article was computed on 13 November 2026 with the parsing code behind AltFTool's Unix timestamp converter (parseTimestamp and detectUnit).

Your inbox, your topics

What do you want more of?

Pick the topics you'd like in your inbox. We've ticked one that matches this guide — change them freely.

Topics you want more of

Up to 200 characters.

Privacy policy

Discussion

0 comments

Loading discussion