mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
Improve consistency for snowflakeToTimestamp (#4177)
This commit is contained in:
@@ -8,6 +8,6 @@ export function bigintToSnowflake(snowflake: BigString): string {
|
||||
return snowflake === 0n ? '' : snowflake.toString()
|
||||
}
|
||||
|
||||
export function snowflakeToTimestamp(id: bigint): number {
|
||||
return Number(id / 4194304n + 1420070400000n)
|
||||
export function snowflakeToTimestamp(snowflake: BigString): number {
|
||||
return Number(BigInt(snowflake) / 4194304n + 1420070400000n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user