Timestamp Problems

Unix Timestamp: Seconds vs Milliseconds and How to Tell

Different systems count Unix time in different units. If you read a milliseconds value as seconds, the date lands thousands of years in the future. If you do the reverse, it lands in January 1970. Checking the digit count avoids both.

Last updated: 2 November 2026

Open Unix Timestamp Converter →

Step-by-step

  1. Count the digits of the timestamp.
  2. Ten digits is almost certainly seconds. Thirteen digits is almost certainly milliseconds.
  3. Enter the value in the Unix Timestamp Converter, which reads 13 or more digits as milliseconds.
  4. Check that the date is the one you expect.
  5. To convert, divide milliseconds by 1,000 to get seconds, or multiply seconds by 1,000 to get milliseconds.

Which systems use which unit

JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds. Python's time.time() returns seconds as a decimal number, and many databases and APIs use whole seconds. The exp and iat claims in a JWT are in seconds.

Signs that the unit is wrong

A date in January 1970 usually means a seconds value was read as milliseconds. A date tens of thousands of years in the future means a milliseconds value was read as seconds. Always check the first date you see against what you expect.

Example

1700000000 is 14 November 2023 22:13:20 UTC in seconds. The same moment is 1700000000000 in milliseconds. Reading the milliseconds value as seconds gives a year far beyond 50000.

USE THE TOOL

Finish the task with DevUtilityKits

Use the relevant online utility, check the result, and continue with your development workflow.

Open Unix Timestamp Converter →Open Timestamp to Date →
FAQ

Frequently asked questions

How many digits is a timestamp in seconds?

A current timestamp in seconds has ten digits. In milliseconds it has thirteen.

Does JavaScript use seconds or milliseconds?

Milliseconds. Date.now() returns milliseconds, so divide by 1,000 for seconds.

What unit does a JWT use?

The exp, iat and nbf claims use seconds.

Why is my timestamp off by a factor of 1,000?

The value is in one unit and was read as the other. Check the digit count and convert.