You convert a timestamp and the answer is obviously wrong. Not subtly wrong, not a rounding question: the date says 1970, or the year has five digits, or the hour is shifted just enough to make you distrust the whole thing. The good news is that wrong timestamp conversions fail in a small number of recognisable ways, and each way points at its own cause.
This guide works the diagnosis in the order you should check it: the unit first, then the time zone, then the range. Run the same value through the Unix Timestamp Converter on Ovatly as you go, and each step below either fixes the date or clears one suspect so you can move to the next.
Contents
- Quick answer
- Step 1: suspect the unit
- Step 2: suspect the time zone
- Step 3: suspect the range
- Step by step: the full diagnosis
- Limitations
- Common mistakes
- FAQs
- Conclusion
Quick answer
Match the symptom to the cause. A date in 1970 or tens of thousands of years ahead means the unit was read wrong, so force seconds or milliseconds in the Unix Timestamp Converter and convert again. A correct day with a shifted hour means a time zone display difference, so compare the UTC line. An error instead of a date means the value is outside the supported range, about 275,000 years either way, and probably was not a timestamp at all.
Step 1: suspect the unit
Check this first because it is the most common cause and the errors are enormous, which makes them easy to spot. Timestamps count in seconds or in milliseconds, and reading one unit as the other moves the date by a factor of a thousand.
The two failure directions are mirror images. A seconds value read as milliseconds collapses toward the epoch: 1700000000, which is Tuesday, 14 November 2023 at 22:13:20 UTC, becomes Tuesday, 20 January 1970 when read as milliseconds. A millisecond value read as seconds rockets forward: 1700000000000 read as seconds lands in the year 55840.
The fix is to stop letting detection guess. The converter auto-detects using a threshold of 1 trillion and shows which unit it used; if the date is absurd, set the unit selector to the other unit and read again. One caution: auto-detection can misread millisecond values from before 2001, because they are smaller than 1 trillion, so for historical records force milliseconds rather than trusting the threshold.
Step 2: suspect the time zone
If the day is right but the hour looks wrong, the value is probably fine and the frame is the issue. A timestamp names an instant, and the instant never changes; only its display changes with time zone. The UTC and ISO 8601 lines are zone-free, while the local line applies your device's zone. The same 1700000000 that reads 22:13:20 in UTC reads 03:13:20 on 15 November on a device set to UTC+5. Both readings are correct, and when two people compare notes across zones, the UTC line is the common ground.
The zone also bites in the reverse direction. When you pick a date and time and ask for its timestamp, the converter interprets the picked time in your local time zone, and says so on the result. Picking 22:13:20 on 14 November 2023 in a UTC+5 zone produces 1699982000, because that wall-clock time in that zone is 17:13:20 UTC. If a timestamp you generated is off by a whole number of hours from the one you expected, this interpretation is why, and the remedy is to pick the time in UTC terms or account for your offset.
Step 3: suspect the range
If the converter returns an error rather than a date, the value is outside what it can represent. Values beyond the range JavaScript dates support, about 275,000 years either way, are reported as errors. No real event produces such a value, so an error is diagnostic in itself: something about the number is not a timestamp.
The usual stories are mundane. Extra digits crept in when the number was copied, two fields were concatenated, or the number was never a time at all, perhaps an identifier that merely looks numeric. A 14-digit value such as 99999999999999, read as seconds, is beyond the representable range and yields an error rather than a date. Recheck the source value digit by digit before assuming the tool is at fault.
Step by step: the full diagnosis
- Paste the value into the Unix Timestamp Converter and note which unit auto-detection used.
- If the date is in 1970 or the far future, force the other unit with the selector and read again. Most wrong dates end here.
- If the day is right but the hour is shifted, compare the UTC line instead of the local line, and remember the reverse direction reads picked times as local.
- If you get an error, count the digits and re-copy the value from its source, checking for extra or missing digits.
- Cross-check with the relative description. A reading of "3 days ago" that matches the event you are investigating is a good sign the conversion is finally right.
Limitations
This diagnosis assumes the underlying number is a genuine timestamp in one of the two standard units. The converter works locally and reports exactly what a value converts to; it cannot know what moment you meant to record, and it cannot repair a value that was stored wrongly at the source. The zone behaviour is likewise a property of the format, not a defect: a timestamp carries no zone of its own, so any tool, this one included, must choose a frame to display it in, and the local interpretation of picked times is stated on the result rather than hidden.
Common mistakes
- Debugging the hour before the unit. An absurd year is a unit problem. Fix the biggest symptom first; the hour question only makes sense once the date is sane.
- Comparing local lines across zones. Two correct local readings of one timestamp can differ by many hours. Compare UTC lines when the readers are in different places.
- Forgetting the reverse direction is local. A picked time is interpreted in your zone. A generated timestamp that is hours away from a reference value usually reflects that, not a fault.
- Assuming an error means a broken tool. Out-of-range errors usually mean the copied number has extra digits or was never a timestamp.
FAQs
My converted date is in 1970. What went wrong? Almost always the unit. A seconds value read as milliseconds compresses the moment to within days of the epoch: 1700000000 read as milliseconds becomes 20 January 1970 instead of 14 November 2023. Force seconds with the unit selector and convert again.
My converted date is thousands of years in the future. Why? The mirror-image unit error: a millisecond value read as seconds. The value 1700000000000 read as seconds lands in the year 55840. Force milliseconds with the unit selector. Millisecond values from before 2001 can trip auto-detection the same way, because they fall below the 1 trillion threshold.
The date looks right but the hour is off by a few hours. Is the conversion wrong? Probably not. The moment is identical; only its display changes with time zone. The UTC and ISO lines are zone-free, while the local line applies your device's zone. Compare the UTC line when you need common ground with someone in another zone.
Why did the date-to-timestamp direction give a different number than I expected? Because the date and time you pick are interpreted in your local time zone, and the converter says so on the result. Picking 22:13 on 14 November 2023 in a UTC+5 zone produces 1699982000, the moment that is 17:13:20 UTC, not 1700000000.
Why does the converter show an error instead of a date? The value is outside the range JavaScript dates support, about 275,000 years either way. Real timestamps sit nowhere near that range, so an error usually means the number was not a timestamp at all, or extra digits crept in when it was copied.
Conclusion
Wrong conversions are rarely mysterious once you read the symptom: absurd years mean the unit, shifted hours mean the zone, and an outright error means the range. Work the three checks in that order and nearly every bad date resolves into the moment it always was. For the background on the two units themselves, Seconds vs Milliseconds: Which Timestamp Format Do You Have covers the digit test and the detection threshold in depth, and the Developer Tools archive collects the related guides.