From 4527a66c833b60bfc83d9d5451afb2ebf6accb53 Mon Sep 17 00:00:00 2001 From: Sean Hurley Date: Sat, 4 Feb 2023 23:45:24 -0700 Subject: [PATCH] Prepare date in UTC to prevent timezone infinite loop --- src/components/list/partials/filters.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/list/partials/filters.vue b/src/components/list/partials/filters.vue index ccb7e4cf8..ca238e0ec 100644 --- a/src/components/list/partials/filters.vue +++ b/src/components/list/partials/filters.vue @@ -427,10 +427,10 @@ function prepareDate(filterName, variableName) { const endDate = new Date(params.value.filter_value[foundDateEnd]) filters.value[variableName] = { dateFrom: !isNaN(startDate) - ? `${startDate.getFullYear()}-${startDate.getMonth() + 1}-${startDate.getDate()}` + ? `${startDate.getUTCFullYear()}-${startDate.getUTCMonth() + 1}-${startDate.getUTCDate()}` : params.value.filter_value[foundDateStart], dateTo: !isNaN(endDate) - ? `${endDate.getFullYear()}-${endDate.getMonth() + 1}-${endDate.getDate()}` + ? `${endDate.getUTCFullYear()}-${endDate.getUTCMonth() + 1}-${endDate.getUTCDate()}` : params.value.filter_value[foundDateEnd], } }