1234567890 is a Unix timestamp in seconds. It represents 2009-02-13T23:31:30Z.
The same instant in milliseconds
JavaScript Date expects milliseconds, so the equivalent value is 1234567890000.
const seconds = 1234567890;
const date = new Date(seconds * 1000);
console.log(date.toISOString());
// 2009-02-13T23:31:30.000Z
The common wrong-unit result
Passing 1234567890 directly to new Date() treats it as milliseconds and produces 1970-01-15T06:56:07.890Z. That date is not a parsing mystery; it is a seconds-versus-milliseconds mismatch.
Use it in a range query
A single timestamp makes a useful fixture or known-event reference. For a date range, calculate the start and next boundary in the intended timezone, then use a half-open comparison: greater than or equal to the start and less than the next start.
Frequent questions:
- Q: What date is Unix timestamp 1234567890?
- A: 1234567890 in Unix seconds is 2009-02-13T23:31:30.000Z — Friday, February 13, 2009 at 23:31:30 UTC.
- Q: What is 1234567890 in milliseconds?
- A: 1234567890000 milliseconds is the same instant — the form JavaScript Date and Java Instant expect.
- Q: Why does new Date(1234567890) show 1970?
- A: JavaScript Date takes milliseconds. The seconds value treated as milliseconds points to early 1970. Use new Date(1234567890 * 1000) instead.
- Q: How do I convert 1234567890 in shell?
- A: Linux: date -u -d @1234567890. macOS: date -u -r 1234567890. Both return the UTC date.