Skip to content

Commit

Permalink
fix: Pad milliseconds with three zeroes
Browse files Browse the repository at this point in the history
It was previously padded only with two zeroes, which Graylog parses incorrectly
  • Loading branch information
bmaupin committed Sep 28, 2021
1 parent fea0d5c commit 5171a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/glossy/produce.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ function generateDate(dateObject) {
leadZero(dateObject.getHours()) + ':' +
leadZero(dateObject.getMinutes()) + ':' +
leadZero(dateObject.getSeconds()) + '.' +
leadZero(dateObject.getMilliseconds()) +
String(dateObject.getMilliseconds()).padStart(3, '0') +
timeOffset;

return formattedDate;
Expand Down

0 comments on commit 5171a4c

Please sign in to comment.