Skip to content
toolbelt
Back to Guides

Why Your Timestamp Is Off by Exactly a Day

By ·

Updated

The number is right, the date is wrong. Nine times in ten it is milliseconds versus seconds, or a timezone you did not think about.

What is this tool?

A Unix timestamp counts seconds since 1 January 1970 UTC. Some systems use milliseconds. Both look like integers, which is the problem.

How it works

I show the current epoch on a live clock, convert either direction, and report both local and UTC so you can see which one you were comparing against.

Example

1700000000      → 2023-11-14 22:13:20 UTC
1700000000000   → 2023-11-14 22:13:20 UTC

Same instant, one is seconds, one is milliseconds.

When to use it

Reading a log line. Checking an exp claim. Debugging why a date shows as 1970 — which always means an empty or zero value, never a real bug in the conversion.

Optimization Tips

Count the digits. Ten is seconds, thirteen is milliseconds. If you get a date in 1970, your value was zero or a string. If you get a date thousands of years out, you multiplied seconds by 1000 twice.

Frequently Asked Questions

What timezone do timestamps use?
None. Epoch is absolute. It only becomes a date when you apply a timezone, and that is where confusion starts.
Why does the same timestamp show different dates?
Because one view is local and one is UTC. Both are correct.
Does this handle year 2038?
Browsers use double precision, so they are fine well past 2038. Your 32-bit database column is not.
Can I convert a whole list?
Yes, the Timestamp Batch tool does that with per-line unit detection.

Ready to try it out?

Put this knowledge into practice with our free tool.

Go to Tool

Related tools