Skip to content

Commit

Permalink
Merge pull request #141 from jtuckerfubo/bugfix/log-displays-wrong-month
Browse files Browse the repository at this point in the history
Debug logging displays the wrong month.
  • Loading branch information
triwav authored Jul 29, 2024
2 parents 0db3fde + da46703 commit 428639f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/OnDeviceComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ export class OnDeviceComponent {
private debugLog(message: string, ...args) {
if (this.getConfig()?.clientDebugLogging) {
const date = new Date;
const formattedDate = `${utils.lpad(date.getMonth())}-${utils.lpad(date.getDate())} ${utils.lpad(date.getHours())}:${utils.lpad(date.getMinutes())}:${utils.lpad(date.getSeconds())}:${utils.lpad(date.getMilliseconds(), 3)}`;
const formattedDate = `${utils.lpad(date.getMonth() + 1)}-${utils.lpad(date.getDate())} ${utils.lpad(date.getHours())}:${utils.lpad(date.getMinutes())}:${utils.lpad(date.getSeconds())}:${utils.lpad(date.getMilliseconds(), 3)}`;
console.log(`${formattedDate} [ODC][${this.device.getCurrentDeviceConfig().host}] ${message}`, ...args);
}
}
Expand Down

0 comments on commit 428639f

Please sign in to comment.