October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How Discord Timestamps, Snowflake IDs, and Code-Block Colors Work

Discord timestamps localize for each viewer, Snowflake IDs encode a millisecond timestamp, and official documentation does not define current ANSI color support in code blocks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Discord timestamps use Unix time in seconds and render in each viewer’s local time and locale. Snowflake IDs encode a creation time in their upper 42 bits, which can be decoded with Discord’s documented epoch and formula. Discord documents fenced code blocks, but the official documentation reviewed does not specify a current ANSI color palette or compatibility across clients.

How Discord dynamic timestamps work

To show a time that adapts to each person viewing a message, use Discord’s timestamp markup. The timestamp value is a Unix timestamp in seconds; Discord renders it using the viewer’s timezone and locale. The underlying instant is shared, while the displayed clock time or date can differ. See Discord’s Message Formatting reference.

As an Amazon Associate I earn from qualifying purchases.

Use either <t:TIMESTAMP> or <t:TIMESTAMP:STYLE>. For example, Discord documents <t:1618953630> and <t:1618953630:d>. The style letter chooses how the instant is displayed:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Style Example in Discord’s reference Use
t 16:20 Short time
T 16:20:30 Time including seconds
d 20/04/2021 Short date
D April 20, 2021 Long date
f April 20, 2021 at 16:20 Long date and short time
F Tuesday, April 20, 2021 at 16:20 Full date and short time
s 20/04/2021, 16:20 Short date and short time
S 20/04/2021, 16:20:30 Short date and time including seconds
R 4 years ago Relative time

Choose a compact clock style (t or T) for a start time, a date style (d or D) for a deadline, a date-and-time style for a scheduled event, or R when relative wording is useful. The reference’s examples illustrate formats; exact date order and wording can vary by locale.

What a Discord Snowflake ID contains

Discord uses the Snowflake format for unique identifiers. A Snowflake is up to 64 bits, and its fields include a timestamp plus internal generation values. Discord’s API Reference defines the layout and extraction formulas:

Bit positions Width Field Documented interpretation
63–22 42 bits Timestamp Milliseconds since the Discord epoch; extract with (snowflake >> 22) + 1420070400000.
21–17 5 bits Worker ID Internal worker value: (snowflake & 0x3E0000) >> 17.
16–12 5 bits Process ID Internal process value: (snowflake & 0x1F000) >> 12.
11–0 12 bits Increment Per-process increment: snowflake & 0xFFF.

The Discord epoch is 1420070400000 milliseconds, corresponding to the first second of 2015. Shifting a Snowflake right by 22 bits removes the generation fields; adding the epoch yields the timestamp in milliseconds. This gives the time encoded in the ID at millisecond resolution, not additional user-facing details about the worker or process.

Decode an ID safely

Conceptually, the timestamp calculation is:

timestamp_ms = (snowflake >> 22) + 1420070400000

Use an integer representation that can preserve the full Snowflake value before shifting it. Discord warns that integer handling can overflow in some languages and says IDs are returned as strings in the HTTP API. Its ID Serialization guidance advises expecting IDs as strings; do not casually convert an API ID to a floating-point number or a narrower integer type.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a Snowflake from a timestamp

Discord also documents the inverse timestamp-based construction: (timestamp_ms - DISCORD_EPOCH) << 22. Here, the input timestamp is in milliseconds and DISCORD_EPOCH is 1420070400000. This formula constructs the timestamp portion; it does not supply the worker, process, or increment information associated with normal ID generation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What is established about ANSI colors in Discord code blocks

Discord Support’s Markdown Text 101, last updated April 23, 2025, documents multiline code blocks made by wrapping text in triple backticks. It does not specify an ansi language tag, supported escape sequences, a color palette, or behavior across clients.

A Discord community feature request posted March 14, 2023 reported a limited set of foreground and background colors rather than full RGB escape sequences. That is a user report, not an official renderer specification, and it cannot establish what works in current clients. The reviewed official sources therefore support the basic code-fence syntax, but not a reliable current ANSI color tutorial or compatibility guarantee. Avoid assuming a palette or that colored output will look the same for every recipient.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.