Working with dates and timestamps in JavaScript can be slightly confusing because JS handles time in milliseconds, whereas standard Unix timestamps use seconds.
Here is a quick reference guide to handle both correctly.
Get Current Timestamp in Milliseconds
By default, JavaScript's Date.now() returns the current timestamp in milliseconds:const timestampMs = Date.now();
console.log(timestampMs); // Output: 1726053000000








