What a Unix timestamp is
A Unix timestamp counts the time since the epoch, 00:00:00 UTC on 1 January 1970. Because it is a single number with no time zone attached, it identifies the same instant everywhere, which is why logs, databases and APIs use it. A time zone only matters when you display it, so the same timestamp reads as different clock times in different places.
Seconds, milliseconds and beyond
Systems disagree about the unit. Many Unix tools and JWT claims use seconds, JavaScript and Java use milliseconds, and databases and tracing systems may use microseconds or nanoseconds. You can usually tell by length: 10 digits is seconds, 13 is milliseconds, 16 is microseconds and 19 is nanoseconds. The tool detects this and tells you what it assumed. If you paste a value that is much too small or large for what you expect, the unit is the first thing to check, and you can set it yourself.
Integers are read exactly, so a 19-digit nanosecond value keeps its full precision instead of being rounded by floating-point arithmetic.
Dates without a time zone
Turning a date into a timestamp needs a time zone, and many tools quietly pick one for you. JavaScript, for instance, reads 2026-01-01 as UTC but 2026-01-01T00:00 as your local time, so two neighbouring formats can differ by hours. Here, ISO 8601 text is read exactly in the zone you choose, local time or UTC, unless the text carries its own offset such as Z or +02:00. Impossible dates, such as 30 February or hour 24, are rejected instead of being rolled forward into the next month.
Text that is not ISO 8601, such as "Jan 1 2026 9:30 AM", is passed to your browser, whose rules vary, and the tool says so. For anything you need to reproduce, use ISO format.
Show it in any time zone
Pick a zone such as America/New_York or Asia/Tokyo to see the same instant as local time there, including daylight saving. That makes it easy to answer "what time was this for the customer?" without doing the arithmetic by hand.
Pitfalls
A few things cause most timestamp bugs:
- Mixing seconds and milliseconds is the most common bug: a value 1000 times too large puts a date thousands of years in the future.
- Signed 32-bit seconds overflow on 19 January 2038 at 03:14:07 UTC (2147483647).
- Unix time ignores leap seconds, so every day is exactly 86,400 seconds.
- Always store and compare timestamps, and convert to a time zone only for display.