From a4edf21e7b69aecb0d37c4cc0a1bf8ac761cf16d Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Fri, 27 Dec 2024 04:47:06 +0300 Subject: [PATCH] Fix time offset Signed-off-by: Alexander Platov --- packages/ui/src/components/calendar/DatePopup.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/calendar/DatePopup.svelte b/packages/ui/src/components/calendar/DatePopup.svelte index e29c58dc15..fbf4f9e82d 100644 --- a/packages/ui/src/components/calendar/DatePopup.svelte +++ b/packages/ui/src/components/calendar/DatePopup.svelte @@ -86,7 +86,7 @@ } } const changeMonth = (date: Date): Date => { - return new Date(Date.UTC(date.getFullYear(), date.getMonth() + 1, 1)) + return new Date(Date.UTC(date.getFullYear(), date.getMonth() + 1, 1) + date.getTimezoneOffset() * 60000) } $: if (viewDate) viewDateSec = changeMonth(viewDate)