This commit is contained in:
Mylloon 2024-09-24 14:03:15 +02:00
parent 4667b668d5
commit 3e85f7cd5c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -6,8 +6,13 @@
* @returns String
*/
export const showDate = (locale: Map<string, unknown>, 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 {