#Snowflake.deconstruct return incorrect value

1 messages · Page 1 of 1 (latest)

lament ember
#

Hi. Im trying to decode timestamp from message id (DiscordSnowflake.deconstruct(message.id).timestamp) but it returns me incorrect value - message has been sent at 3:32 UTC and this code returns 1722023722053

royal tulipBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

lament ember
#

Ofc im using @sapphire/snowflake utility

fluid fossil
#

@open blade @royal fern

royal fern
#

well whats the snowflake

#

but yeah the logic for snowflakes hasn't changed in ever

open blade
#

Also, that code is used in Discord.js for many createdTimestamp getters such as Message and... it's accurate to say the least

#

s!ev [message.createdAt, new Date()];

dire canopyBOT
#

Output: ⏱ 711.58μs```js
[ 2024-07-27T15:39:50.797Z, 2024-07-27T15:39:50.870Z ]

fluid fossil
#

I just realized. Are you sure you're using DiscordSnowflake?

#

Or how it was called now

#

Base snowflake doesn't use the discord epoch

royal fern
#

thats what they show

fluid fossil
#

Mb

lament ember