Tech
Unix timestamp conversion pitfalls: seconds, milliseconds, and timezones

Unix time counts seconds since 1970-01-01 00:00:00 UTC (the epoch), ignoring leap seconds in the usual POSIX definition most APIs use. Logs, JWTs, database columns, and object stores speak this language. Humans do not. One wrong assumption about seconds versus milliseconds shifts a date by decades. One silent local-timezone conversion moves an incident window across midnight. Use a unix timestamp converter that shows local, UTC, and ISO together, and learn the failure modes before you page someone for a “future” event that is only a unit bug.
Why epoch values look “random” in logs
A value like 1725628800 is seconds; 1725628800000 is the same instant in milliseconds. JavaScript Date.now() returns milliseconds. Many Unix shells and Go time.Now().Unix() return seconds. Mixed stacks produce off-by-1000 bugs that still look like plausible timestamps until you convert them.
Leading zeros do not appear. Negative values are pre-1970 instants. Float timestamps with fractional seconds appear in some systems; truncating without documentation loses sub-second order.
People paste timestamps into spreadsheets and Excel offers date formats that assume a different epoch. Prefer a dedicated converter or code for forensic work.
Seconds versus milliseconds: the classic trap
Rule of thumb: 10-digit numbers near 1_700_000_000 are seconds in the 2020s. 13-digit numbers near 1_700_000_000_000 are milliseconds. 16-digit values may be microseconds. Toolsy’s converter treats shorter numbers as seconds and longer ones as milliseconds per its FAQ. When in doubt, convert both ways and see which date lands in your incident window.
JavaScript pitfalls:
new Date(1725628800) // treats input as ms → year 1970 + ~20 days
new Date(1725628800 * 1000) // correct if the source was seconds
Always label columns ts_s or ts_ms in warehouses. Unlabeled timestamp columns cause silent bugs for years.
ISO-8601 round-trips
APIs often want 2026-09-06T12:00:00.000Z. Convert epoch → ISO for tickets; convert ISO → epoch for query params. Keep the Z (UTC) explicit. Dropping the zone and re-parsing as local is how “3pm UTC” becomes “3pm in São Paulo” in a report.
Local versus UTC on the converter
Toolsy shows local time (browser zone), UTC, and ISO from the same input. Compare UTC to the log line’s stated zone. If your laptop is in US Eastern and the server logs UTC, the local pane will disagree with the log by hours even when the instant is correct. Trust UTC for distributed systems.
Timezone and DST footguns
Epoch instants are absolute. Civil dates (“Monday morning”) depend on zone. A deploy finished at 2026-03-08T07:00:00Z is still Sunday evening in US Pacific. Write postmortems in UTC or include offsets every time.
DST transitions create repeated or missing civil hours. Instant math in epoch seconds stays monotonic in the usual POSIX model; formatting to local time around the transition needs a real timezone database. The converter’s “local” output uses the browser’s zone rules, not an arbitrary IANA picker for every city on Earth.
Leap seconds (what you can ignore day to day)
Most application timestamps are UTC-SLS / Unix time without leap smearing detail. Astronomical precision and some telecom stacks differ. For SaaS log debugging, assume no leap second insertion in your epoch math unless your vendor documents otherwise. Do not blame leap seconds for an off-by-1000 bug.
Year 2038 and 32-bit storage
Signed 32-bit seconds overflow on 2038-01-19. Embedded devices and ancient schemas still store time_t as 32-bit. Prefer 64-bit seconds or milliseconds in new systems. If a device reports weird dates near the epoch after 2038, suspect overflow.
Walkthrough: convert a log value safely
- Copy the raw number from the log. Do not retype.
- Open Unix timestamp. Paste once.
- Read UTC and ISO first. Confirm the year is plausible for your incident.
- If the year is 1970 or far future, retry with the other unit interpretation (×1000 or ÷1000 in your head).
- Paste the ISO string into the ticket so humans need not re-convert.
When release artifacts include both a checksum and a build epoch, verify bytes with SHA-256 for file integrity checks and convert the build time with the steps above.
UUID v7 embeds Unix milliseconds
UUID v7 places a Unix millisecond timestamp in the high bits. If you debug ID ordering, you are also debugging epoch ms. See UUID v4 vs v7 for databases and APIs. Do not parse v7 as a wall-clock API; use it as an identifier with time locality.
API and integration context
Wiring webhooks and widgets? Keep conversion logic server-side when trust matters, and skim Developer integrations complete guide for how Toolsy separates browser utilities from upload APIs. The timestamp tool itself stays client-side: nothing uploaded per the FAQ.
Related mistakes that look like timestamp bugs
Wrong database session timezone on TIMESTAMP WITHOUT TIME ZONE columns. Storing local civil time while calling it UTC. Mixing datetime and timestamptz in Postgres without a migration plan. Comparing a seconds column to Date.now() milliseconds in a filter and getting empty result sets.
Spreadsheet serial dates are a different epoch story entirely; do not “convert” Excel serials as Unix unless you know the Excel epoch and the 1900 leap-year bug. For CSV date messes, use CSV to Excel without broken dates.
Write timestamps so the next human survives
In tickets and Slack, paste ISO-8601 with offset or Z, plus the raw epoch and its unit: 1725628800 (s) → 2024-09-06T16:00:00.000Z. That single line prevents a second conversion error during handoff.
In schemas, name columns created_at_s or created_at_ms. In JSON examples for partners, include both forms once, then pick a canonical field. Document whether your API truncates or rounds fractional seconds.
For on-call runbooks, store a worked example from your own stack (a known deploy time) so newcomers can calibrate the converter against a date they already trust.
Limits of the online converter
Toolsy’s unix timestamp tool is free, runs in the browser, and shows local, UTC, and ISO. It does not replace a full timezone database UI for every IANA name. It does not settle philosophical debates about leap seconds. Use language standard libraries in production code paths; use the page for debugging and teaching.
Do not paste sensitive tokens into the box thinking they are timestamps. Clear the field on shared machines.
Frequently asked questions
How do I convert a unix timestamp to a readable date?
Paste it into Unix timestamp and read UTC plus ISO. In code, multiply seconds by 1000 for JavaScript Date if your source is seconds. Label units in every API field.
Seconds or milliseconds: how can I tell?
Count digits and sanity-check the year after conversion. 13-digit values in the 1.7e12 range are usually ms in the 2020s. The Toolsy tool applies a short-versus-long heuristic; verify against a known event.
Why is my converted time several hours off?
You are probably reading local time while the log is UTC, or the reverse. Compare the UTC pane. Check whether the logger already applied an offset into the string.
Does this converter upload my data?
No. Conversion runs in your browser. Toolsy does not see or store what you type per the product FAQ.
What is the Year 2038 problem?
32-bit signed second counters overflow in 2038. Use 64-bit storage for new work. Test devices that still use 32-bit time_t.
Can unix timestamps be negative?
Yes. They represent times before 1970-01-01 UTC. Some UIs refuse negatives; the math is still defined for normal ranges.
Why does JavaScript show 1970 for my timestamp?
Date expects milliseconds. You passed seconds. Multiply by 1000.
Should APIs send epoch or ISO-8601?
ISO strings with offset are kinder to humans and reduce unit bugs. Epoch is compact and unambiguous if you document seconds versus ms. Many APIs send both. Pick one canonical form internally.
How do UUID v7 and unix time relate?
UUID v7 embeds Unix time in milliseconds in the high bits for sortability. See the UUID article linked above when IDs and time ordering interact.
Is the converter free for bulk log work?
The page is free with no account. For millions of rows, convert in your warehouse or scripts, not by hand in a browser box.
Next time a log looks “off by years,” paste it into Unix timestamp and check units before you escalate. Pair with SHA-256 for file integrity checks when the artifact’s bytes matter as much as its build time.
Convert unix timestamps
Paste epoch seconds or milliseconds and see local time, UTC, and ISO. Runs in your browser with no upload.


