From c72fae63358aa2ac66b89dd30770ae27e2397a70 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 23 Sep 2024 19:32:06 +0200 Subject: [PATCH] fix #100 --- src/utils/time.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/time.ts b/src/utils/time.ts index bfec23e..be714e9 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -5,8 +5,10 @@ * @param date Date * @returns String */ -export const showDate = (locale: Map, date: Date) => - `${date.toDateString()} ${locale.get("u_time_at")} ${date.toTimeString().split(" ")[0]}`; +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]}`; +}; enum TimeSecond { Year = 31536000,