From 19b8f28e9c6128581c01754f2f1dafffef465175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Tue, 12 Mar 2019 11:24:44 +0100 Subject: [PATCH] Fix timezone error with moment --- src/filter/RuleHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter/RuleHelper.js b/src/filter/RuleHelper.js index 0ed85dfed07b..a2054db68eb1 100644 --- a/src/filter/RuleHelper.js +++ b/src/filter/RuleHelper.js @@ -727,8 +727,8 @@ const exports = class { } if (momentEnd) { - const startValue = moment(value).format('YYYY-MM-DD HH:mm:ss'); - const endValue = momentEnd.format('YYYY-MM-DD HH:mm:ss'); + const startValue = moment(value).utc().format('YYYY-MM-DD HH:mm:ss'); + const endValue = momentEnd.utc().format('YYYY-MM-DD HH:mm:ss'); filter = olFormatFilter.during(name, startValue, endValue); } }