Discord Timestamp Generator – One Instant, Every Reader's Clock
Announcing a raid, a stream, a community call or the close of a giveaway in a server whose members are scattered across a dozen countries is a small nightmare. Write “20:00 CET” and half the channel does arithmetic in their head; write “8pm my time” and nobody can. Discord solves this with a piece of markdown that the client renders specially: a Discord timestamp, written as <t:UNIX_SECONDS:STYLE>. Every reader sees the same instant painted in their own timezone and their own locale. There is no way to produce that token from inside the Discord client, which is what this Discord timestamp generator is for.
What the token actually contains
Only two things: a whole number of seconds since 1 January 1970 UTC, and an optional single letter naming the style. The number is an instant, not a time-of-day — it carries no timezone at all, which is precisely why it can be rendered differently for everybody without ever being ambiguous. The seconds are whole seconds, obtained with Math.floor of the millisecond value rather than by truncation, so the conversion stays correct on the negative side of the epoch.
The seven styles
| Style | Name | Shape |
|---|---|---|
t | Short time | 16:20 |
T | Long time | 16:20:30 |
d | Short date | 20/04/2021 |
D | Long date | 20 April 2021 |
f | Short date/time | 20 April 2021 16:20 |
F | Long date/time | Tuesday, 20 April 2021 16:20 |
R | Relative | 2 months ago / in 3 hours |
Those shapes are illustrative, not a contract — the wording and ordering come from each reader's locale. Two rules matter more than the shapes. First, the style letter is case-sensitive: t and T are different styles, and r is not a style at all. Anything outside the seven letters makes Discord print the token as literal text instead of a timestamp. Second, omitting the style is legal. A bare <t:1618946400> is rendered as if it carried f, which is why this tool emits it as a genuine eighth output row rather than burying it in a footnote.
Turning a wall-clock time into an instant
The hard part of this tool is not the token, it is the sentence “8pm on the 29th, Paris time”. JavaScript cannot parse a wall-clock time in a named zone directly, so the conversion is done explicitly: read the entered fields as though they were UTC, ask the zone for its offset at that guess, subtract it, then ask the zone for its offset at the result and correct once more if the first guess landed on the wrong side of a daylight-saving transition. Two passes converge for every real-world zone.
That iteration also exposes the two cases that quietly ruin event announcements. On the night clocks go forward, an hour of wall-clock time does not exist — 02:30 is skipped entirely — and this tool says so, offering the instant immediately after the change rather than silently inventing one. On the night clocks go back, an hour happens twice, so two different instants match the same wall clock. Both are shown, labelled with their UTC offsets, and you choose.
1618946400000 read as seconds lands somewhere around the year 54,000. The Unix mode here guesses the unit from the magnitude, tells you which one it picked, shows the resulting date immediately, and lets you override the guess.Reading a token back
Paste an existing <t:1618946400:F> and the tool returns the instant plus every other style for the same moment. Parsing is strict and matches the whole string after trimming, with one concession: a surrounding pair of backticks is peeled off first, because people copy tokens out of code formatting. A missing <t:, a non-integer, a two-character style or an unknown letter each produce a message naming the specific fault instead of a vague refusal.
Edge cases worth knowing
Dates before 1970 produce negative seconds. The tool emits them, but flags plainly that client handling of negative timestamps is inconsistent and was not verified here. Values past 2147483647 — 19 January 2038, where a signed 32-bit counter runs out — carry a similar caution, because some clients are reported to truncate there. Values outside JavaScript's representable date range are refused outright, and empty or partial fields disable the output rather than rendering <t:NaN:f>.
Everything runs in your browser
There is no network request of any kind, no API key and no bot. The whole job is arithmetic plus the browser's built-in Intl formatters, which is also the honest limit of the previews: they are produced by your browser's locale data as an approximation of Discord's renderer, not a byte-exact reproduction of it. The shape will match; the exact separators may not. Copy buttons always copy the token itself, never the preview text.