This commit is contained in:
2024-03-05 04:58:05 +03:00
parent 659d76b694
commit e2962f3be2
11 changed files with 141 additions and 56 deletions

7
src/shared/lib/utils.ts Normal file
View File

@@ -0,0 +1,7 @@
export const dateWithoutTimezone = (date: Date) => {
const tzoffset = date.getTimezoneOffset() * 60000; //offset in milliseconds
const withoutTimezone = new Date(date.valueOf() - tzoffset)
.toISOString()
.slice(0, -1);
return withoutTimezone;
};