Code Tools StudioCode Tools Studio
All Tools
Tools
JSON FormatterCode MinifierRegex TesterPDF MergePDF SplitPDF to TextImage ConverterJSON Schema GeneratorText Case ConverterBase64 Encoder/DecoderURL Encoder/DecoderHash GeneratorUUID GeneratorColor ConverterTimestamp ConverterLorem Ipsum GeneratorJWT DecoderText Diff CheckerMarkdown Previewer

Command Palette

Search tools and actions

Guides

Unix Timestamps Explained (Seconds, Milliseconds, and the 2038 Problem)

Code Tools Studio·4 min read·March 17, 2026

A Unix timestamp (also called epoch time) is a single number: the count of seconds since January 1, 1970, 00:00:00 UTC, known as the Unix epoch. 1700000000 isn't an arbitrary-looking number for no reason: it's exactly that many seconds after that moment. Paste any timestamp into the Timestamp Converter to see it as a real date instantly, in both UTC and your local timezone.

Why it's always UTC-based

The count itself has no timezone: it's a fixed number of seconds since a fixed instant. Timezones only enter the picture when you display it as a human-readable date — the same timestamp shows as a different clock time in Tokyo than in New York, but it's the same instant. This is exactly why timestamps are the safe choice for storing "when something happened" in a database: no ambiguity, no daylight-saving edge cases, just an integer.

Seconds vs. milliseconds

This is the single most common mix-up: some systems (Unix/Linux tooling, most APIs) use seconds, while JavaScript's Date.now() and many web APIs use milliseconds. You can usually tell by digit count: a seconds-based timestamp for a recent date is 10 digits (1700000000); a milliseconds-based one is 13 (1700000000000). Get this wrong and a date either lands in 1970 (treating milliseconds as seconds) or thousands of years in the future (treating seconds as milliseconds). The Timestamp Converter auto-detects which one you've pasted by digit count, so you don't have to eyeball it.

Where you'll actually run into raw timestamps

  • A JWT's exp and iat claims (see How to Read a JWT Token) are always Unix seconds.
  • Database columns like created_at often store or export as epoch integers.
  • Log lines from servers and infrastructure tools frequently print raw epoch seconds instead of formatted dates.

The Year 2038 problem

Older systems store Unix time as a signed 32-bit integer, which overflows on January 19, 2038 — the count simply runs out of room and wraps around to a negative number, which then gets read as a date back in 1901. Most modern systems have already moved to 64-bit timestamps, which push the same problem out roughly 292 billion years, but plenty of embedded and legacy systems haven't, which is why the date still gets mentioned in serious engineering discussions rather than treated as a joke.

Converting one right now

Paste a timestamp — or click Now — into the Timestamp Converter to see it as ISO 8601, local time, UTC, and a relative label like "3 days ago", all at once, in both directions.

Code Tools Studio - 19 privacy-first tools for everyday developer tasks | Product Hunt
Files auto-deleted after 1 hour TLS 1.3 encrypted 99.9% uptime
PrivacyTermsBlog

© 2026 Code Tools Studio. All rights reserved.