Discord timestamp
MDV ToolsPick a time and copy a code that Discord shows in each reader's own time zone.
How this works
A Discord timestamp is a short piece of message markup, <t:SECONDS:STYLE>. The
number is Unix time — whole seconds since 1 January 1970 UTC — and the letter picks how it is
written. Discord draws it for every reader in their own time zone and language, so one code reads
15:00 in Rome and 09:00 in New York. Discord's reference lists nine styles: t short
time, T medium time, d short date, D long date,
f long date with short time, F full date with short time, s
short date with short time, S short date with medium time, and R
relative ("in 2 hours"). A code with no letter, <t:1789478460>, is written as
f.
The date and time you pick are a wall-clock time in the zone you pick, which starts on this
device's own zone. The page turns them into seconds with this browser's copy of the IANA time zone
database, through Intl.DateTimeFormat: it reads the zone's offset at a first guess,
moves by it, and reads again. A time the clocks skip when they go forward is moved on by the
length of the jump, and a time that happens twice when they go back takes the first of the two;
both are named on the page. Seconds are kept; there is no finer unit in the code. +1 hour adds
3,600 seconds; +1 day and +1 week keep the wall-clock time and move the date, so across a change
of summer time they add 23 or 25 hours rather than drift by one. Now takes this device's clock to
the minute.
The line under each code is an estimate of what you would see: it is written with
Intl.DateTimeFormat and Intl.RelativeTimeFormat in this browser's
language and this device's zone, both printed above the list. Discord writes dates with its own
language setting and its own date library, so the words can differ — "at" or a comma between date
and time, "in a day" or "tomorrow" — while the moment is the same. The code is exact; the preview
is a guide. The relative line is redrawn every second while the page is open.
The paste box reads <t:1789478460:R>, <t:1789478460>,
t:1789478460:R or the bare number, and puts that moment into the date field in the
zone you picked. A number of 13 digits or more is taken as milliseconds and the page says so. A
letter that is not one of the nine is refused and named. Discord documents no range, so this page
keeps to 1 January 1970 through 31 December 9999 and refuses anything outside it rather than write
a negative or overlong number; the paste box refuses input over 100 characters. Nothing is sent
to Discord or anywhere else: there is no server in this file.
The Dark button remembers its setting in this browser's local storage. Nothing you type or drop into the page is stored.