From a00d8f6501858d98fb39749b97e1478497085658 Mon Sep 17 00:00:00 2001 From: Elmar Kresse Date: Thu, 27 Jun 2024 20:52:26 +0200 Subject: [PATCH] fix:#19 removed rmTZ function --- frontend/src/components/CalendarViewer.vue | 6 +++--- frontend/src/helpers/dates.ts | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/CalendarViewer.vue b/frontend/src/components/CalendarViewer.vue index 45a1e9c..dc2e8f4 100644 --- a/frontend/src/components/CalendarViewer.vue +++ b/frontend/src/components/CalendarViewer.vue @@ -30,7 +30,7 @@ import interactionPlugin from "@fullcalendar/interaction"; import timeGridPlugin from "@fullcalendar/timegrid"; import iCalenderPlugin from "@fullcalendar/icalendar"; import router from "@/router"; -import { formatYearMonthDay, removeTZ } from "@/helpers/dates.ts"; +import { formatYearMonthDay } from "@/helpers/dates.ts"; import { useI18n } from "vue-i18n"; import { useQuery } from "@tanstack/vue-query"; import tokenStore from "@/store/tokenStore.ts"; @@ -50,8 +50,8 @@ const op = ref(); const clickedEvent = ref(); const toggle = (info: EventClickArg) => { - const start = !info.event.start ? "" : removeTZ(info.event.start); - const end = !info.event.end ? "" : removeTZ(info.event.end); + const start = !info.event.start ? "" : info.event.start; + const end = !info.event.end ? "" : info.event.end; if (op.value.visible) { clickedEvent.value = null; diff --git a/frontend/src/helpers/dates.ts b/frontend/src/helpers/dates.ts index 2851c62..1f5cf7f 100644 --- a/frontend/src/helpers/dates.ts +++ b/frontend/src/helpers/dates.ts @@ -22,7 +22,3 @@ export function formatYearMonthDay(date: Date): string { return date.toISOString().split("T")[0].replace(/-/g, ""); } - -export function removeTZ(date: Date): Date { - return new Date(date.getTime() + date.getTimezoneOffset() * 60000); -}