diff --git a/index.ts b/index.ts index 7a7e90c..b62ad7c 100644 --- a/index.ts +++ b/index.ts @@ -15,7 +15,7 @@ const port = Number(process.argv[3]); function msgToString(time: Date, address: string, msg: string) { return "[" + time.getDate() + "." + (time.getMonth() + 1) + "." + time.getFullYear() + - " " + time.getHours() + ":" + time.getMinutes() + + " " + String(time.getHours()).padStart(2, '0') + ":" + String(time.getMinutes()).padStart(2, '0') + "] {" + address + "} " + msg; }