Twitter's Default Epoch
1288834974657
📅 November 4, 2010
⏰ 01:42:54.657 UTC
All Twitter Snowflake IDs encode timestamps relative to this epoch
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:
- Extends the lifespan of 41-bit timestamps by ~69 years
- IDs remain valid until approximately 2079 (69 years from 2010)
- Smaller timestamp values result in smaller overall IDs
- More efficient bit utilization for Twitter's use case
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
- Epoch value: 1288834974657 milliseconds since Unix epoch
- Date: November 4, 2010, 01:42:54.657 UTC
- Used in: All Twitter Snowflake IDs (tweets, users, DMs)
- Bit position: First 41 bits of the 64-bit ID
- Maximum lifespan: ~69 years from epoch (until ~2079)
- Precision: Millisecond accuracy
Common Use Cases
- Implementing Twitter ID decoders
- Building Twitter API integrations
- Analyzing tweet timelines
- Debugging timestamp issues
- Creating custom Snowflake implementations