From 63c2b26af98775bd6cc8e12c5ff403bd3e61ae9b 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 b3f6a6749..618e48329 100644 --- a/src/components/project/partials/filters.vue +++ b/src/components/project/partials/filters.vue @@ -410,10 +410,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], } }