Unix Timestamps Explained: Seconds, Milliseconds, and Dates

A Unix timestamp counts seconds or milliseconds since 1970-01-01T00:00:00Z. This guide shows which unit you have and how YallaSolve converts seconds or milliseconds to ISO 8601 UTC.

Last updated: October 28, 2026

Quick answer

A Unix timestamp is the number of seconds, or sometimes milliseconds, since 1970-01-01T00:00:00Z. That origin is the Unix epoch. The integer is UTC, not a local wall clock. If the number has about 10 digits, it is often seconds. If it has about 13 digits, it is often milliseconds. Digit count alone is not definitive. Mixing those units by a factor of 1000 is how a date lands in 1970 or in the year 50,000.

The Timestamp Generator snapshots the current instant as seconds, milliseconds, and ISO 8601 UTC. Choose Seconds or Milliseconds, enter a whole number, and use From Unix value. The tool does not guess the unit from digit count. This guide is unix timestamps explained so you pick the unit before you paste.

What the Unix epoch is

The epoch is midnight UTC on 1 January 1970. Unix seconds 0 is 1970-01-01T00:00:00.000Z. Negative whole seconds name instants before 1970. Some databases reject those. The YallaSolve page will still show the ISO form when the integer is in range. Whether you should store a negative value is a schema question, not a generator question.

Unix time ignores leap seconds as civil clocks treat them. The page does not apply a leap-second table. For ordinary application timestamps that is the usual POSIX count. If you needed a time scale that includes leap seconds, this guide is the wrong document.

Seconds versus milliseconds

Milliseconds = seconds × 1000. The same instant must keep that relationship.

Unit Typical digit count (2020s) Example value ISO 8601 UTC
Seconds ~10 1700000000 2023-11-14T22:13:20.000Z
Milliseconds ~13 1700000000000 2023-11-14T22:13:20.000Z
Wrong unit (seconds value read as ms) ~10 treated as ms 1700000000 as ms 1970-01-20T16:13:20.000Z
  1. Count the digits of the integer you were given, ignoring a leading minus. Use that as a hint, not a proof.
  2. About 10 digits near 1.7 billion is usually seconds for dates in the 2020s.
  3. About 13 digits near 1.7 trillion is usually milliseconds. The same instant as milliseconds is 1700000000000.
  4. If you are unsure, convert with the Seconds unit first. If the ISO date is in 1970 and you expected last week, you probably had milliseconds—switch the unit to Milliseconds and convert again. Do not multiply or divide in the field and hope the page reinterprets the paste.

JavaScript’s Date.now() returns milliseconds. Many databases and APIs store seconds. Write the unit next to the number. “1700000000 seconds” and “1700000000000 milliseconds” are the same instant. “1700000000 milliseconds” is 20 January 1970.

Microseconds, nanoseconds, and digit count

Some systems store microseconds (~16 digits near 1.7×1015 for the 2020s) or nanoseconds (~19 digits near 1.7×1018). Digit count alone is still not definitive: a short integer can be seconds from a truncated clock, and a long integer can be a different epoch or an ID. The Timestamp Generator converts seconds and milliseconds only. It will not silently divide a microsecond or nanosecond value. If you have those units, convert to seconds or milliseconds with a documented factor first, then paste.

Common mistakes

  • Milliseconds pasted as seconds. 1700000000000 as seconds is far outside a usable civil date and should be refused or look absurd—not “fixed” by guessing.
  • Seconds pasted as milliseconds. 1700000000 as milliseconds is 1970-01-20T16:13:20.000Z. Dates near 1970 when you expected the 2020s usually mean the unit was wrong by ×1000.
  • Implausible far-future dates. Treating milliseconds as seconds (or multiplying seconds by 1000 twice) can push the calendar into the year 50,000+. That is almost always a unit error, not a real event time.
  • Assuming digit length proves the unit. Prefer the API docs, column name, or a known sample instant over counting digits alone.

Year 2038 in brief

On systems that store time as a signed 32-bit time_t counting seconds since the epoch, the maximum representable value is 231−1 seconds, which is 2038-01-19T03:14:07Z. After that instant those clocks overflow. This is a storage-width problem on those platforms, not a property of Unix time itself. Modern 64-bit time_t, JavaScript’s millisecond Date, and many databases are not limited to that ceiling. YallaSolve’s browser tool uses JavaScript Date and a documented absolute-value window; it is not a signed-32-bit converter.

Convert a Unix value on YallaSolve

  1. Open the Timestamp Generator.
  2. Choose Seconds or Milliseconds. Empty input and decimals are errors.
  3. Enter the whole number and choose From Unix value.
  4. Read seconds, milliseconds, and ISO 8601 UTC. Copy seconds writes the seconds row.

Extremely large integers are refused so the Date object stays usable: absolute seconds above 1×1011, or absolute milliseconds above 1×1014 (the same instant window). That bound is documented on the tool. The ISO row always includes milliseconds and a Z. Some APIs want seconds only as an integer; use Copy seconds. Some APIs want milliseconds; read the milliseconds row instead of multiplying in your head and dropping a zero.

Convert a local clock the other way

  1. Use Now when you need the current instant from this computer’s clock. Two clicks a second apart differ by about one second. If the clock is wrong, Now is wrong. The page does not reach a network time service.
  2. Or enter a local date and time in the local field. That field uses this browser’s zone. It is not an IANA picker.
  3. Choose From local time. The ISO row is still UTC.

A local time of 2024-01-15 12:00 in a UTC+4 browser is 2024-01-15T08:00:00.000Z. The same civil clock in another zone is a different instant. The page will not apply “America/New_York” or any other zone name you type. There is no zone list on purpose. Time-zone conversion is a different product.

What this page will not do

This is not a duration calculator and not an age calculator. Those pages count spans. This page names an instant. If the job was “how many nights between two dates,” use the Date Difference Calculator. If the job was “22:15 to 06:45,” use the Time Duration Calculator. Do not glue those jobs onto a Unix integer and call it a timestamp.

Write a labeled sentence: “1700000000 Unix seconds,” “1700000000000 milliseconds,” or “2023-11-14T22:13:20.000Z.” Unix timestamps explained is finished when the unit and the calendar date can be checked against each other. A bare 13-digit integer in a ticket is not finished. If a teammate later multiplies seconds by 1000 and stores that as seconds, the next reader will land in the wrong century. Keep the unit in the column name or the comment, not only in the integer.

References

On this page

Related guides

Related Articles

Related solutions

Need a tool for this ?

Open the free tools — no signup.

FAQs

Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.