zeus 4 years ago
parent
commit
ac7b24179a
  1. 12
      swarmlab-app/src/run/app.js

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

@ -137,7 +137,17 @@ cors(corsOptions), (req, res, next) => {
var obj = req.body[i]; var obj = req.body[i];
var reslog = new Object(); var reslog = new Object();
reslog.message = obj 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); io.emit("logdata", reslog);
/* /*

Loading…
Cancel
Save