From 45648e46ba2f434357b7a2a90b22b28d07aac4c8 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 18 Nov 2019 10:02:58 +0100 Subject: [PATCH] FIX: attempts to be correct about dst when using recurrence (#8366) --- .../assets/javascripts/discourse-local-dates.js.no-module.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/discourse-local-dates/assets/javascripts/discourse-local-dates.js.no-module.es6 b/plugins/discourse-local-dates/assets/javascripts/discourse-local-dates.js.no-module.es6 index 8e87d886819..f8ef41bca7e 100644 --- a/plugins/discourse-local-dates/assets/javascripts/discourse-local-dates.js.no-module.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/discourse-local-dates.js.no-module.es6 @@ -194,9 +194,9 @@ const type = parts[1]; const diff = moment().diff(dateTime, type); const add = Math.ceil(diff + count); - const wasDST = moment(dateTime.format()).isDST(); + const wasDST = dateTime.isDST(); let dateTimeWithRecurrence = dateTime.add(add, type); - const isDST = moment(dateTimeWithRecurrence.format()).isDST(); + const isDST = dateTimeWithRecurrence.isDST(); if (!wasDST && isDST) { dateTimeWithRecurrence.subtract(1, "hour");