From e08b88704810085a97831890360937efc9e00040 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/project/partials/filters.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/project/partials/filters.vue b/src/components/project/partials/filters.vue index 5ea3de591..24ae69a47 100644 --- a/src/components/project/partials/filters.vue +++ b/src/components/project/partials/filters.vue @@ -411,10 +411,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], } }