Timestamp
Documentation for the /timestamp command to generate and format Discord timestamps
/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.
Available Subcommands
Current Time
Gets the current timestamp in a specified format.
Options
Option | Description | Required |
---|---|---|
format | The timestamp format (t, T, d, D, f, F, R) | Yes |
Example
Output
Format a Specific Date and Time
Formats a specific date and time as a Discord timestamp.
Options
Option | Description | Required |
---|---|---|
date | The date in YYYY-MM-DD format | Yes |
time | The time in HH:MM format | Yes |
format | The timestamp format (t, T, d, D, f, F, R) | Yes |
Example
Output
Convert a Unix Timestamp
Converts a Unix timestamp to a Discord timestamp.
Options
Option | Description | Required |
---|---|---|
timestamp | The Unix timestamp (in seconds) | Yes |
format | The timestamp format (t, T, d, D, f, F, R) | Yes |
Example
Output
Discord Timestamp Format Reference
Format | Display Type | Example | Discord Code |
---|---|---|---|
t | Short Time | 16:20 | <t:1710071130:t> |
T | Long Time | 16:20:30 | <t:1710071130:T> |
d | Short Date | 20/04/2021 | <t:1710071130:d> |
D | Long Date | 20 April 2021 | <t:1710071130:D> |
f | Short Full | 20 April 2021 16:20 | <t:1710071130:f> |
F | Long Full | Tuesday, 20 April 2021 16:20 | <t:1710071130:F> |
R | Relative | 2 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