AscendLab
Article

Convert Unix Timestamps Without Guessing Units or Time Zones

Unix timestamps appear in logs, APIs, and databases, but counting digits to guess seconds versus milliseconds is error-prone. Here is how to convert them correctly every time.

timestampunixtimeapilogs

Introduction

Unix timestamps show up everywhere: application logs, database created_at columns, JWT claims, CDN headers, payment events, and Git commit metadata. They come as a long integer — 1780034567 — and you have to convert that to a human-readable date to make sense of it.

The common mistake is guessing whether the number is in seconds or milliseconds. A 10-digit timestamp like 1780034567 is seconds. A 13-digit timestamp like 1780034567000 is milliseconds. Mixing them up shifts the date by about 1,000x. If you mistake milliseconds for seconds on a timestamp from 2026, you end up reading a date in 1970. If you mistake seconds for milliseconds on that same timestamp, you end up tens of thousands of years in the future.

The practical solution is to use a converter that shows you multiple formats at once, so you can confirm the result against what you expect.

Real-world scenario

You are reviewing a server log during an incident. The relevant line reads:

[2026-05-29 14:32:07] Payment failed for user_id=42, event_id=evt_3NvR2kp, timestamp=1780036327

You paste 1780036327 into a timestamp converter. The output shows:

  • Unix seconds: 1780036327
  • Unix milliseconds: 1780036327000
  • UTC: 2026-05-29T06:32:07Z
  • Local (your time zone, GMT+8): 2026-05-29 14:32:07

That confirms the event happened at 14:32 in your local time zone, which matches the log timestamp. If you had misread the unit and looked at milliseconds, you would have gotten a date in 1970 and wasted 20 minutes on a wild goose chase.

What the converter does

A timestamp converter takes a numeric or text input and shows it in multiple formats simultaneously:

  • Unix seconds: the raw integer most Linux systems use
  • Unix milliseconds: the format JavaScript's Date.now() returns
  • ISO 8601: the standard YYYY-MM-DDTHH:mm:ssZ format
  • UTC: a human-readable form in Universal Coordinated Time
  • Local time: the conversion in your browser's current time zone

This lets you verify the result by comparing formats and catching unit confusion before it causes an incident.

Example inputs and outputs

Input: 1780036327 (10 digits = seconds)

Result:

  • Unix seconds: 1780036327
  • ISO: 2026-05-29T06:32:07Z
  • Local (GMT+8): 2026-05-29 14:32:07

Input: 1780036327000 (13 digits = milliseconds)

Result:

  • Unix seconds: 1780036327
  • ISO: 2026-05-29T06:32:07Z
  • Local (GMT+8): 2026-05-29 14:32:07

Both show the same moment. The difference is just the unit.

Input: 2026-05-29T14:32:07+08:00 (ISO string)

Result:

  • Unix seconds: 1780036327
  • Unix milliseconds: 1780036327000
  • UTC: 2026-05-29T06:32:07Z

Common mistakes

Counting digits wrong. The boundary between seconds and milliseconds is roughly 10 digits versus 13 digits. Get into the habit of looking at the length before you assume.

Ignoring time zone in the input. If a timestamp was recorded in a different time zone, converting it to local time changes the hour. When you are comparing logs from servers in different regions, always anchor to UTC first and convert to local time second.

Trusting ambiguous date strings. 05/06/2026 could be May 6 or June 5 depending on locale. Always prefer ISO 8601 format (2026-05-06) when sharing or storing timestamp values. Use the converter to translate ambiguous strings into ISO before storing them.

Tool limits

The converter relies on the browser's built-in Date parser for text inputs. Very unusual date formats may not parse correctly in all browsers. When precision matters, prefer a raw Unix timestamp or an ISO string over a free-text date description.

The local time output depends on your device's time zone setting. If you are reviewing logs from a server in a different region, check UTC first and convert from there.

Next steps

After converting a timestamp, you may need to:

Final practical note

When you see a Unix timestamp in a log or API response, do not guess. Paste it into a timestamp converter and confirm it reads as the date you expect. The two seconds it takes to verify saves you from an incident investigation going down the wrong path.

Related tools