← timestamps.app

What is a UNIX timestamp?

A UNIX timestamp is the number of seconds that have elapsed since 00:00:00 UTC on 1 January 1970 — a moment known as the UNIX epoch. It's the format most software uses internally to represent a single instant in time, independent of timezone.

Why count seconds since 1970?

UNIX, the operating system that most of today's servers descend from, was designed in the early 1970s. Its engineers picked 1 January 1970 UTC as a fixed reference point and stored every date as the count of seconds since then. The convention stuck. Almost every programming language, database, and API uses some variant of it: JavaScript counts milliseconds since 1970, most other systems count seconds.

The point of using a single integer is that it has no timezone, no daylight saving ambiguity, and no calendar quirks. 1735138800 means the same instant in New York as it does in Tokyo — only how we display it changes.

A few examples

  • 0 — 1 January 1970, 00:00:00 UTC (the epoch itself)
  • 1000000000 — 9 September 2001, 01:46:40 UTC
  • 1700000000 — 14 November 2023, 22:13:20 UTC
  • 1735138800 — 25 December 2025, 15:00:00 (3 PM) in New York

You can paste any of these into the timestamp generator to see them rendered in your local timezone.

Where UNIX timestamps show up

Anywhere software needs to record "when": file modification times, log entries, database rows, JWT expirations, API responses, OAuth tokens, and Discord messages. Discord in particular uses UNIX timestamps inside its timestamp format tags so that a single message renders correctly for users in every timezone.

Seconds vs milliseconds

Two conventions exist side by side. Most languages and databases store UNIX time in seconds(a 10-digit number for current dates). JavaScript's Date.now() and many web APIs use milliseconds(a 13-digit number). If a value looks suspiciously large or small by 1000×, that's usually the reason — divide or multiply by 1000 to convert.

The year 2038 problem

Older systems store UNIX timestamps in a signed 32-bit integer, which overflows on 19 January 2038. Modern systems use 64-bit integers, which won't overflow for roughly 292 billion years — so for everyday use, including Discord, this isn't something you need to worry about.

How to convert a UNIX timestamp

The simplest way is to pick a date and time on the timestamp generator: it shows you the UNIX timestamp alongside Discord's six rendered formats, ready to copy. If you're building software, every major language has a built-in: Math.floor(Date.now() / 1000) in JavaScript, time.time() in Python, time() in PHP.

Related