zeus 4 years ago
parent
commit
8af5f970dc
  1. 9
      swarmlab-app/src/run/app.js

9
swarmlab-app/src/run/app.js

@ -99,6 +99,11 @@ async function checkToken(token) {
} }
} }
function convertDateToUTC(date) {
return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
}
// *************************************************** // ***************************************************
// rest get // rest get
// *************************************************** // ***************************************************
@ -148,7 +153,9 @@ cors(corsOptions), (req, res, next) => {
n.minutes = now.getMinutes(); n.minutes = now.getMinutes();
n.seconds = now.getSeconds(); n.seconds = now.getSeconds();
n.milliseconds = now.getMilliseconds(); n.milliseconds = now.getMilliseconds();
reslog.date = n //reslog.date = n
reslog.date = convertDateToUTC(now)
console.log(reslog); console.log(reslog);
io.emit("logdata", reslog); io.emit("logdata", reslog);

Loading…
Cancel
Save