📅 Twitter Snowflake Default Epoch

Understanding Twitter's custom epoch timestamp

Twitter's Default Epoch

1288834974657
📅 November 4, 2010
⏰ 01:42:54.657 UTC

All Twitter Snowflake IDs encode timestamps relative to this epoch

Calculate with Default Epoch

SNOWFLAKE ID
TIMESTAMP BITS (41-bit)
+ DEFAULT EPOCH
1288834974657 ms
= UNIX TIMESTAMP
📅 FINAL DATE

What is Twitter's Snowflake Default Epoch?

Twitter's Snowflake default epoch is the starting point for all timestamp calculations in Twitter IDs. Instead of using the Unix epoch (January 1, 1970), Twitter chose November 4, 2010, 01:42:54.657 UTC as their custom epoch.

Why November 4, 2010?

Twitter selected this date because it was approximately when they began developing the Snowflake ID system. Using a custom epoch closer to the present provides several advantages:

Epoch Comparison

Unix Epoch

January 1, 1970

0 milliseconds

Used by most systems

Twitter Epoch

November 4, 2010

1288834974657 ms

Custom for Snowflake

Discord Epoch

January 1, 2015

1420070400000 ms

Different custom epoch

How to Use the Default Epoch

To convert a Twitter Snowflake ID to a timestamp, follow this formula:

// JavaScript Example
const TWITTER_EPOCH = 1288834974657n;
const snowflakeId = 1382350606417817604n;

// Extract timestamp bits (right-shift by 22)
const timestampBits = snowflakeId >> 22n;

// Add Twitter's default epoch
const unixTimestamp = Number(timestampBits + TWITTER_EPOCH);

// Convert to date
const date = new Date(unixTimestamp);
console.log(date); // April 18, 2021
# Python Example
TWITTER_EPOCH = 1288834974657
snowflake_id = 1382350606417817604

# Extract timestamp bits
timestamp_bits = snowflake_id >> 22

# Add Twitter's default epoch
unix_timestamp = timestamp_bits + TWITTER_EPOCH

# Convert to datetime
from datetime import datetime
date = datetime.fromtimestamp(unix_timestamp / 1000)
print(date) # 2021-04-18

Technical Details

Common Use Cases

🔗 Related Snowflake ID Tools

🐦 Twitter Snowflake Decoder 💬 Discord Snowflake Decoder 📸 Instagram Snowflake Decoder

📚 Learn More About Snowflake IDs

How to Decode Tutorial Real ID Examples Snowflake Calculator ID to Timestamp