fix: custom date now works correctly

This commit is contained in:
overflowerror 2021-08-21 20:24:56 +02:00
parent 35a9b38fb0
commit b61be2af7a

View file

@ -7,8 +7,8 @@ class CustomDate extends Date {
timezone: boolean = true): string {
let result =
this.getFullYear() + "-" +
(String(this.getMonth()).padStart(2, "0")) + "-" +
(String(this.getDay()).padStart(2, "0")) + "T" +
(String(this.getMonth() + 1).padStart(2, "0")) + "-" +
(String(this.getDate()).padStart(2, "0")) + "T" +
(String(this.getHours()).padStart(2, "0")) + ":" +
(String(this.getMinutes()).padStart(2, "0")) + ":" +
(String(this.getSeconds()).padStart(2, "0"))