diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 8058256..887cd8c 100755 --- a/swarmlab-app/src/run/app.js +++ b/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 // *************************************************** @@ -148,7 +153,9 @@ cors(corsOptions), (req, res, next) => { n.minutes = now.getMinutes(); n.seconds = now.getSeconds(); n.milliseconds = now.getMilliseconds(); - reslog.date = n + //reslog.date = n + + reslog.date = convertDateToUTC(now) console.log(reslog); io.emit("logdata", reslog);