From 3e85f7cd5c93cc261a8129e50af24fdb5881fd45 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 24 Sep 2024 14:03:15 +0200 Subject: [PATCH] debug --- src/utils/time.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/utils/time.ts b/src/utils/time.ts index be714e9..a92221f 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -6,8 +6,13 @@ * @returns String */ export const showDate = (locale: Map, date: Date) => { - const timezoned = new Date(date.getTime()); - return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${timezoned.toTimeString().split(" ")[0]}`; + const timezoned = new Date(date.getTime() + date.getTimezoneOffset() * 60000); + + console.log(date.getTimezoneOffset()); + + return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${ + timezoned.toTimeString().split(" ")[0] + }`; }; enum TimeSecond {