diff --git a/src/utils/dateUtils.ts b/src/utils/dateUtils.ts index 21aa71d9..68bc8b96 100644 --- a/src/utils/dateUtils.ts +++ b/src/utils/dateUtils.ts @@ -100,9 +100,7 @@ export function getStartAndEndDay(instant: Temporal.Instant, timeZone = "Europe/ const today = Temporal.PlainDate.from(instant.toZonedDateTimeISO(timeZone)); const tomorrow = today.add({ days: 1 }); - const startOfToday = today.toZonedDateTime({ timeZone: "Europe/Berlin" }); - const startOfTomorrow = tomorrow.toZonedDateTime({ - timeZone: "Europe/Berlin", - }); + const startOfToday = today.toZonedDateTime({ timeZone }).toPlainDate(); + const startOfTomorrow = tomorrow.toZonedDateTime({ timeZone }).toPlainDate(); return { startOfToday, startOfTomorrow }; }