Yk what, im dumb
This commit is contained in:
parent
056f2a7eb9
commit
2d86399900
|
@ -1,8 +1,8 @@
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
require('moment-duration-format');
|
require('moment-duration-format');
|
||||||
module.exports = {}
|
module.exports = {}
|
||||||
//const change = 62167219200; // Subtract a year, whoops
|
const change = 62167219200; // Subtract a year, whoops
|
||||||
const change = 62135683200
|
//const change = 62135683200
|
||||||
module.exports.convertSLTimestamp = (timestamp) => {
|
module.exports.convertSLTimestamp = (timestamp) => {
|
||||||
// Convert SCP SL timestamp to seconds since SCP epoch
|
// Convert SCP SL timestamp to seconds since SCP epoch
|
||||||
const ourTs = Number(BigInt(timestamp) / 10000000n);
|
const ourTs = Number(BigInt(timestamp) / 10000000n);
|
||||||
|
@ -12,7 +12,8 @@ module.exports.convertSLTimestamp = (timestamp) => {
|
||||||
|
|
||||||
// Adjust for local timezone (Mountain Time in this case)
|
// Adjust for local timezone (Mountain Time in this case)
|
||||||
const date = new Date(unixTs * 1000); // Convert to milliseconds for JavaScript Date constructor
|
const date = new Date(unixTs * 1000); // Convert to milliseconds for JavaScript Date constructor
|
||||||
|
// add 1 year
|
||||||
|
date.setFullYear(date.getFullYear() + 1)
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue