Fix timestamps.
This commit is contained in:
parent
e671e502c3
commit
161e938c49
2
index.ts
2
index.ts
@ -15,7 +15,7 @@ const port = Number(process.argv[3]);
|
|||||||
|
|
||||||
function msgToString(time: Date, address: string, msg: string) {
|
function msgToString(time: Date, address: string, msg: string) {
|
||||||
return "[" + time.getDate() + "." + (time.getMonth() + 1) + "." + time.getFullYear() +
|
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 + "} "
|
"] {" + address + "} "
|
||||||
+ msg;
|
+ msg;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user