Discord Unix Timestamp

Every dynamic timestamp you see in a Discord message is powered by a Unix timestamp under the hood. When you type something like <t:1700000000:F> into a Discord chat, the app reads that integer, converts it to a date and time in the viewer's local time zone, and renders it inline. Understanding how Unix timestamps work is the key to mastering Discord's timestamp markdown and making your messages time-zone-proof.

Current Unix Timestamp
---
Loading...

What Is a Unix Timestamp?

A Unix timestamp (also called Unix epoch time or POSIX time) is the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC — a moment known as the Unix epoch. This single integer gives every computer on the planet a language-agnostic, time-zone-neutral way to represent a specific point in time.

Because Unix timestamps are just plain numbers, they avoid the ambiguity of date strings like "03/06/2026" (is that March 6 or June 3?). They also sidestep daylight saving changes, locale-specific formatting, and calendar inconsistencies. That universality is exactly why Discord chose Unix timestamps as the backbone of its timestamp format system.

How Discord Uses Unix Timestamps

Discord's timestamp syntax follows a simple pattern: <t:UNIX_TIMESTAMP:STYLE>. When the Discord client encounters this pattern in a message, it performs three steps:

  1. Parses the integer — Discord extracts the Unix timestamp (the number between t: and the second colon).
  2. Applies the format style — The letter after the second colon (t, T, d, D, f, F, or R) determines how the date is displayed.
  3. Converts to local time — The client renders the timestamp in the viewer's own time zone, so everyone sees the correct local equivalent automatically.

This means a single Discord Unix timestamp code works for every user worldwide. A server admin in New York and a member in Tokyo will both see the event time displayed correctly for their location, with no manual conversion necessary. You can try generating one yourself with our Discord Timestamp Generator.

Unix Timestamp Format in Discord

Discord supports seven format styles for Unix timestamps. Each style uses the same underlying Unix timestamp but renders it differently. Here is the full reference table using the example timestamp 1700000000 (November 14, 2023, 22:13:20 UTC):

Syntax Style Example Output
<t:1700000000:t> Short Time 10:13 PM
<t:1700000000:T> Long Time 10:13:20 PM
<t:1700000000:d> Short Date 11/14/2023
<t:1700000000:D> Long Date November 14, 2023
<t:1700000000:f> Short Date/Time November 14, 2023 10:13 PM
<t:1700000000:F> Long Date/Time Tuesday, November 14, 2023 10:13 PM
<t:1700000000:R> Relative 2 years ago

If you omit the style letter entirely (e.g., <t:1700000000>), Discord defaults to the short date/time format (f). For a deeper dive into each format option, see our Discord Timestamp Format guide. The Relative (R) format is especially popular for creating live countdowns.

How to Get a Unix Timestamp

There are several quick ways to obtain a Unix timestamp for use in Discord:

Once you have the Unix timestamp integer, wrap it in Discord's syntax (<t:YOUR_NUMBER:F>) and paste it into any message, embed, or bot response.

Converting Between Unix Timestamps and Dates

Converting a Unix timestamp to a human-readable date is straightforward because the timestamp is simply the total seconds since the epoch. In JavaScript:

// Unix timestamp to Date
const unixTimestamp = 1700000000;
const date = new Date(unixTimestamp * 1000); // multiply by 1000 for milliseconds
console.log(date.toISOString()); // "2023-11-14T22:13:20.000Z"

// Date to Unix timestamp
const now = new Date();
const timestamp = Math.floor(now.getTime() / 1000);
console.log(timestamp); // current Unix timestamp

The multiplication by 1000 is necessary because JavaScript's Date object works in milliseconds, while Unix timestamps are measured in seconds. This is a common source of bugs — if your Discord timestamp is showing a date in January 1970, you probably forgot to divide by 1000.

For converting dates into Discord-ready codes without writing any code, the Discord Timestamp Converter handles the math for you.

Common Unix Timestamp Examples

Here are some notable Unix timestamps to give you a sense of scale and help with testing:

Unix Epoch
0
Jan 1, 1970 00:00 UTC
Y2K
946684800
Jan 1, 2000 00:00 UTC
1 Billion
1000000000
Sep 9, 2001 01:46 UTC
Discord Founded
1431648000
May 15, 2015 00:00 UTC
2 Billion
2000000000
May 18, 2033 03:33 UTC
Y2K38 (32-bit limit)
2147483647
Jan 19, 2038 03:14 UTC

The Y2K38 problem is the Unix equivalent of Y2K: systems using a signed 32-bit integer for timestamps will overflow on January 19, 2038. Modern 64-bit systems (including Discord's servers) are unaffected, so your Discord Unix timestamps will keep working well beyond that date.

Unix Timestamp in Discord Bots

If you're building a Discord bot, you'll frequently need to create Unix timestamps programmatically. Here's how to generate Discord timestamp markdown in the two most popular bot libraries:

discord.js (JavaScript / Node.js):

const { time, TimestampStyles } = require('discord.js');

// Using a Date object
const eventDate = new Date('2025-12-31T23:59:59Z');
const timestamp = time(eventDate, TimestampStyles.LongDateTime);
// Result: <t:1767225599:F>

// Manual approach using Unix seconds
const unix = Math.floor(eventDate.getTime() / 1000);
const manual = `<t:${unix}:R>`; // relative format
// Result: <t:1767225599:R>

await interaction.reply(`Event starts ${timestamp}`);

discord.py (Python):

import discord
from datetime import datetime, timezone

# Using discord.utils.format_dt
event_date = datetime(2025, 12, 31, 23, 59, 59, tzinfo=timezone.utc)
timestamp = discord.utils.format_dt(event_date, style='F')
# Result: <t:1767225599:F>

# Manual approach
import time
unix = int(event_date.timestamp())
manual = f"<t:{unix}:R>"  # relative format
# Result: <t:1767225599:R>

await interaction.response.send_message(f"Event starts {timestamp}")

Both libraries provide helper functions that accept standard date/time objects and return the correct Discord Unix timestamp markdown string. Using these helpers is preferred over manual string building because they handle edge cases like time zone conversions automatically.

Ready to generate a Discord Unix timestamp without writing code? Head to the Discord Timestamp Generator to pick your date, preview all seven format styles, and copy the code in one click.