Ask coding questions

← Back to all posts
Discord.js Date
maraujogosling (0)

I am using Discord.js. In msg.createdAt, it returns me a time, but it is 3 hours in front of mine .. I need to change this but I can't for the new Date (). How do I make this time the same as mine? Can I change the time on

SixBeeps (5047)

You need to create a duplicate of the Date object. Something like this

var copiedDate = new Date(msg.createdAt.getTime() - 3*60*60*1000);