/timestamp Command

The /timestamp command allows you to generate and format Discord timestamps in various formats. Discord timestamps are automatically localized to the viewer’s time zone.

Discord syntax: /timestamp <subcommand> <options>

Available Subcommands

The Discord version uses slash command with subcommands:
• /timestamp current format: <format>
• /timestamp format date: <YYYY-MM-DD> time: <HH:MM> format: <format>
• /timestamp unix timestamp: <unix_timestamp> format: <format>

Current Time

Gets the current timestamp in a specified format.

/timestamp current format: <format>

Options

OptionDescriptionRequired
formatThe timestamp format (t, T, d, D, f, F, R)Yes

Example

/timestamp current format: R

Output

**Current Time**

Human readable: `Sun, 10 Mar 2024 11:45:30 UTC`
Unix timestamp: `1710071130`

Formatted for Discord: `<t:1710071130:R>`
Will display as: 2 minutes ago

> **Note:** The display will vary based on each user's timezone.

Format a Specific Date and Time

Formats a specific date and time as a Discord timestamp.

/timestamp format date: <YYYY-MM-DD> time: <HH:MM> format: <format>

Options

OptionDescriptionRequired
dateThe date in YYYY-MM-DD formatYes
timeThe time in HH:MM formatYes
formatThe timestamp format (t, T, d, D, f, F, R)Yes

Example

/timestamp format date: 2023-12-31 time: 23:59 format: F

Output

**Timestamp for 2023-12-31 23:59**

Human readable: `Sun, 31 Dec 2023 23:59:00 UTC`
Unix timestamp: `1704067140`

Formatted for Discord: `<t:1704067140:F>`
Will display as: Sunday, 31 December 2023 23:59  (in UTC timezone)
                  Monday, 1 January 2024 00:59  (in UTC+1 timezone)

> **Note:** The display will vary based on each user's timezone.

Convert a Unix Timestamp

Converts a Unix timestamp to a Discord timestamp.

/timestamp unix timestamp: <unix_timestamp> format: <format>

Options

OptionDescriptionRequired
timestampThe Unix timestamp (in seconds)Yes
formatThe timestamp format (t, T, d, D, f, F, R)Yes

Example

/timestamp unix timestamp: 1640995140 format: f

Output

**Timestamp for Unix 1640995140**

Human readable: `Fri, 31 Dec 2021 23:59:00 UTC`
Unix timestamp: `1640995140`

Formatted for Discord: `<t:1640995140:f>`
Will display as: 31 December 2021 23:59  (in UTC timezone)

> **Note:** The display will vary based on each user's timezone.

Discord Timestamp Format Reference

FormatDisplay TypeExampleDiscord Code
tShort Time16:20<t:1710071130:t>
TLong Time16:20:30<t:1710071130:T>
dShort Date20/04/2021<t:1710071130:d>
DLong Date20 April 2021<t:1710071130:D>
fShort Full20 April 2021 16:20<t:1710071130:f>
FLong FullTuesday, 20 April 2021 16:20<t:1710071130:F>
RRelative2 months ago<t:1710071130:R>

Technical Details

How Discord Timestamps Work

Discord timestamps are formatted as <t:TIMESTAMP:FORMAT> where:

  • TIMESTAMP is a Unix timestamp (seconds since January 1, 1970)
  • FORMAT is one of the format codes above

For example, <t:1640995140:R> will display as “2 years ago” (depending on the current date).

Implementation Notes

The timestamp command uses the following under the hood:

  • All timestamps are processed in UTC to ensure consistency
  • The command converts your local time inputs to UTC for storage
  • Discord automatically converts the UTC timestamp to each user’s local timezone
  • The relative format (R) automatically updates as time passes

Timezone Localization

One of the most powerful features of Discord timestamps is that they are automatically converted to each user’s local time zone. This means:

  • A timestamp for 23:59 UTC on December 31 will appear as:
    • 23:59, December 31 for users in UTC timezone
    • 00:59, January 1 for users in UTC+1 timezone
    • 18:59, December 31 for users in UTC-5 timezone

This makes coordination across time zones much easier, as everyone sees the time in their local timezone.

Use Cases

  • Schedule events across different time zones
  • Display countdown timers that update automatically
  • Show the exact time of an event for all users
  • Reference past or future events relative to the current time
  • Set reminders that are properly localized for each team member

Notes

  • Timestamps are automatically adjusted to each user’s local time zone
  • Using relative format (R) will automatically update as time passes
  • You can copy the formatted Discord code and paste it in any Discord message
  • All timestamp processing is done in UTC, even if the time is displayed in local time