TimestampConverter Epoch
Epoch to date and back — seconds, millis, micros or nanos, in any time zone, with the Java that does the same thing.
In-browser & private
1
Timestamp ↔ date
Paste an epoch number or a date string and read it back in any zone.
Epoch right now
—
—
Converted
Type a timestamp or a date above.
Java
—
2
Time zone to time zone
Enter a wall-clock time, say where it was, and read it somewhere else.
Java for this conversion
—
Reading a timestamp correctly
- Units are guessed by magnitude, and the guess is shown. Ten digits is almost always seconds, thirteen milliseconds. That heuristic breaks for dates far from today, so the unit it chose is always stated — and you can force it.
- An epoch has no time zone. It is a count from 1970-01-01T00:00:00Z, the same instant everywhere. The zone only decides how that instant is written down, which is why the same number shows a different wall clock in Kolkata and in New York.
- Millis are not always millis.
System.currentTimeMillis()gives epoch millis, butSystem.nanoTime()is not an epoch at all — it only measures elapsed time and converting it to a date produces nonsense. - JavaScript loses precision past 2^53. Nanosecond timestamps exceed that, so nanos are handled as text here rather than as numbers; conversions stay exact to the second and the sub-second digits are carried through untouched.