-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move user log function where it belongs #1528
Conversation
@@ -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 tz = Helper.config.logs.timezone || "UTC+00:00"; | |||
|
|||
var time = moment().utcOffset(tz).format(format); | |||
var time = moment(msg.time).utcOffset(tz).format(format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes server-time
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, does it? Won't this still use the weird utc offset (which defaults to UTC)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes the fact it always used current time when writing log instead of the server time. So connecting to znc and receiving buffer would log 500 lines all having current time, instead of actual time when message was sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, that was a different thing than what I thought you were saying it fixed. Cool, good catch.
@astorije Should be an easy rebase. |
@@ -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 tz = Helper.config.logs.timezone || "UTC+00:00"; | |||
|
|||
var time = moment().utcOffset(tz).format(format); | |||
var time = moment(msg.time).utcOffset(tz).format(format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, does it? Won't this still use the weird utc offset (which defaults to UTC)?
@@ -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 tz = Helper.config.logs.timezone || "UTC+00:00"; | |||
|
|||
var time = moment().utcOffset(tz).format(format); | |||
var time = moment(msg.time).utcOffset(tz).format(format); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, that was a different thing than what I thought you were saying it fixed. Cool, good catch.
No description provided.