diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 88bd3d8..7867701 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -137,7 +137,17 @@ cors(corsOptions), (req, res, next) => { var obj = req.body[i]; var reslog = new Object(); reslog.message = obj - reslog.date = new Date(year, month, day, hour, minute, second, millisecond); + var now = new Date(); + var n = {} + n.year = now.getFullYear(); + n.month = now.getMonth(); + n.day = now.getDay(); + n.hours = now.getHours(); + n.minutes = now.getMinutes(); + n.seconds = now.getSeconds(); + n.milliseconds = now.getMilliseconds(); + reslog.date = n + console.log(n); io.emit("logdata", reslog); /*