FIX: resets timezone default after callback (#6675)

FIX: resets timezone default after callback (#6675)

From ac556298caeae4d7a9215d69ba3970ab0a63d4ea Mon Sep 17 00:00:00 2001
From: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Date: Tue, 27 Nov 2018 09:56:31 +0100
Subject: [PATCH] FIX: resets timezone default after callback (#6675)


diff --git a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-test.js.es6 b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-test.js.es6
index 2e0ad23..ceae0ca 100644
--- a/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-test.js.es6
+++ b/plugins/discourse-local-dates/test/javascripts/acceptance/local-dates-test.js.es6
@@ -46,6 +46,7 @@ function freezeDateAndZone(date, zone, cb) {
     cb();
 
     moment.tz.guess.returns(DEFAULT_ZONE);
+    moment.tz.setDefault(DEFAULT_ZONE);
     sandbox.useFakeTimers(moment(DEFAULT_DATE).valueOf());
   }
 }

GitHub

1 Like