Write correct timestamp to user log

This commit is contained in:
Pavel Djundik 2017-09-14 10:42:21 +03:00
parent 79eb83d82f
commit 17dd18a605

View file

@ -18,7 +18,7 @@ module.exports.write = function(user, network, chan, msg) {
var format = Helper.config.logs.format || "YYYY-MM-DD HH:mm:ss"; var format = Helper.config.logs.format || "YYYY-MM-DD HH:mm:ss";
var tz = Helper.config.logs.timezone || "UTC+00:00"; var tz = Helper.config.logs.timezone || "UTC+00:00";
var time = moment().utcOffset(tz).format(format); var time = moment(msg.time).utcOffset(tz).format(format);
var line = `[${time}] `; var line = `[${time}] `;
var type = msg.type.trim(); var type = msg.type.trim();