DEV Community

Michael Lip
Michael Lip

Posted on • Originally published at zovo.one

Discord Timestamps: How to Show Times That Automatically Adjust to Every User's Timezone

If you manage a Discord community with members across timezones, you have felt the pain of announcing an event time. "The meeting is at 3 PM" prompts the immediate question: 3 PM where? Discord's built-in timestamp feature solves this elegantly, but almost nobody knows the syntax.

How Discord timestamps work

Discord supports a special syntax that renders as a localized timestamp for every viewer:

<t:1700000000:F>
Enter fullscreen mode Exit fullscreen mode

This renders as a full date and time in each user's local timezone. The person in New York sees "Tuesday, November 14, 2023 2:13 PM" while the person in Tokyo sees "Wednesday, November 15, 2023 4:13 AM."

The number is a Unix timestamp (seconds since January 1, 1970 UTC). The letter after the colon is the format style.

The format styles

  • <t:1700000000:t> - Short time: 2:13 PM
  • <t:1700000000:T> - Long time: 2: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 2:13 PM (default if no format specified)
  • <t:1700000000:F> - Long date/time: Tuesday, November 14, 2023 2:13 PM
  • <t:1700000000:R> - Relative time: "2 months ago" or "in 3 hours"

The relative format (R) is particularly useful for countdowns: "Event starts <t:1700000000:R>" renders as "Event starts in 3 hours" and automatically updates.

Getting the Unix timestamp

The challenge is converting your intended date and time to a Unix timestamp. There are several approaches:

JavaScript console: Math.floor(new Date('2025-03-30T15:00:00-04:00').getTime() / 1000) gives you the Unix timestamp for March 30, 2025 at 3 PM Eastern. The timezone offset (-04:00 for EDT) is critical -- without it, the Date constructor uses your local timezone.

Python: int(datetime(2025, 3, 30, 15, 0, tzinfo=timezone(timedelta(hours=-4))).timestamp())

Command line: date -d '2025-03-30 15:00:00 EDT' +%s on Linux, or date -j -f '%Y-%m-%d %H:%M:%S' '2025-03-30 15:00:00' +%s on macOS.

Common use cases

Event scheduling: Instead of listing times in multiple timezones ("3 PM EST / 12 PM PST / 8 PM GMT"), use a single Discord timestamp. Every member sees their local time.

Deadline reminders: "Assignment due <t:TIMESTAMP:F> (<t:TIMESTAMP:R>)" shows both the exact deadline and a relative countdown.

Log references: "The outage started at <t:TIMESTAMP:T>" gives an unambiguous time reference.

Recurring events: For weekly events, calculate the timestamp for the next occurrence and include a relative time: "Next session <t:TIMESTAMP:R>."

The timezone trap

The most common error is using the wrong timezone when calculating the timestamp. If your event is at 3 PM Eastern but you calculate the timestamp using UTC (without offset), everyone will see a time that is 4-5 hours off (depending on DST).

Always specify the timezone explicitly when generating timestamps. And double-check by converting the timestamp back to your local time to verify it matches your intention.

The tool

For generating Discord timestamps without writing code, I built a Discord timestamp generator that lets you pick a date, time, and timezone, generates the Unix timestamp, and shows all seven format styles with ready-to-copy Discord syntax.


I'm Michael Lip. I build free developer tools at zovo.one. 500+ tools, all private, all free.

Top comments (0)