Joined August 2023
·

faldin865

Working:
const toLocalTime = (time: Date) => {
let d = new Date(time);
let offset = (new Date().getTimezoneOffset() * 60000);
if (offset < 0)
return new Date(d.getTime() - offset);
else
return new Date(d.getTime() + offset);
};

Achievements
1 Karma
0 Total ProTip Views