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
*/
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 {