From ac7b24179aa88e878c6b2b0fce25f71796b1573c Mon Sep 17 00:00:00 2001 From: zeus Date: Wed, 18 Nov 2020 00:16:13 +0200 Subject: [PATCH] add --- swarmlab-app/src/run/app.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); /*