fix: time related issues #179

Merged
Anri merged 5 commits from fix-time into main 2024-09-24 18:07:27 +02:00
Showing only changes of commit 3e85f7cd5c - Show all commits

View file

@ -6,8 +6,13 @@
* @returns String * @returns String
*/ */
export const showDate = (locale: Map<string, unknown>, date: Date) => { export const showDate = (locale: Map<string, unknown>, date: Date) => {
const timezoned = new Date(date.getTime()); const timezoned = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${timezoned.toTimeString().split(" ")[0]}`;
console.log(date.getTimezoneOffset());
return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${
timezoned.toTimeString().split(" ")[0]
}`;
}; };
enum TimeSecond { enum TimeSecond {