Skip to content
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

Merged
merged 2 commits into from
Sep 16, 2017
Merged

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Sep 14, 2017

No description provided.

@xPaw xPaw added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Sep 14, 2017
@xPaw xPaw added this to the 2.5.0 milestone Sep 14, 2017
@@ -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);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes server-time.

Copy link
Member

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)?

Copy link
Member Author

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.

Copy link
Member

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
Copy link
Member

astorije commented Sep 14, 2017

@xPaw, just curious, would this make #663 any more convoluted?

@xPaw
Copy link
Member Author

xPaw commented Sep 14, 2017

@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);
Copy link
Member

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);
Copy link
Member

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.

@AlMcKinlay AlMcKinlay removed their assignment Sep 16, 2017
@AlMcKinlay AlMcKinlay merged commit aace1aa into master Sep 16, 2017
@AlMcKinlay AlMcKinlay deleted the xpaw/move-log-function branch September 16, 2017 19:50
@astorije astorije added the Meta: Internal This is an internal codebase change (testing, linting, etc.). label Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meta: Internal This is an internal codebase change (testing, linting, etc.). Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants