From 161e938c49addc2b6442c236bf4c51b530c909e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Sat, 21 Dec 2024 03:11:15 +0500 Subject: [PATCH] Fix timestamps. --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }