diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f4d8c807..61a6b624ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,13 @@ All notable changes to this project will be documented in this file. ## [unreleased] +### Known bugs + - Options of date polls spanning a DST change may result in miscalculated durations + ### Fixed - Changed sql query to be ansi safe - Cloning polls + - Fix all day duration calculation of date polls ### Added - Show locale date as tooltip for relative date time information diff --git a/src/components/Base/modules/DateBox.vue b/src/components/Base/modules/DateBox.vue index 479f3068fe..7f03baaa8e 100644 --- a/src/components/Base/modules/DateBox.vue +++ b/src/components/Base/modules/DateBox.vue @@ -25,13 +25,10 @@ const allDay = computed( // subtract a day if allDay is true and luxonDuration is greater than 0 to match the // end of the day after the duration instead of the beginning of the next day const to = computed(() => { - // this is a quick fix which intercepts dayspans crossing daylight saving time changes - // Adding duration as seconds divided by a normal dayspan in seconds (86400) multiplied - // by 86400 ensures that we always land at the same time of day, even if the actual - // dayspan is 23 or 25 hours due to DST changes // FIXME: this should be replaced by a more stable solution + // The last change reintroduced the DST bug (see #4276) if (allDay.value) { - return dateTime.plus((duration.as('seconds') / 86400) * 86400) + return dateTime.plus(duration) } return dateTime .plus(duration)