Seconds or milliseconds is the first thing to establish
A Unix timestamp counts elapsed time since 1970-01-01T00:00:00Z, but the unit is not part of the value, and that ambiguity causes more bugs than anything else in date handling. Unix tooling, JWT claims, database `TIMESTAMP` columns and most APIs use seconds. JavaScript's `Date.now()`, Java's `System.currentTimeMillis()` and many logging systems use milliseconds.
Digit count is a reliable check for the current era. A 10-digit value is seconds and lands in the present. A 13-digit value is milliseconds. If a date comes out in 1970, you passed milliseconds to something expecting seconds - divide by 1000. If it comes out around the year 55,000, you did the reverse.
Microseconds (16 digits) appear in Postgres internals and some tracing systems, and nanoseconds (19 digits) in Go's `time.UnixNano()` and Prometheus. Both are worth recognising, because a nanosecond timestamp exceeds JavaScript's safe integer range and will lose precision if parsed as a plain number.