FIX: displays poll's close date in local time (#9656)

FIX: displays poll’s close date in local time (#9656)

diff --git a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
index 9564ec8..3ca2b79 100644
--- a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
+++ b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6
@@ -745,7 +745,7 @@ createWidget("discourse-poll-buttons", {
     }
 
     if (poll.get("close")) {
-      const closeDate = moment.utc(poll.get("close"));
+      const closeDate = moment(poll.get("close"));
       if (closeDate.isValid()) {
         const title = closeDate.format("LLL");
         let label;
@@ -754,7 +754,7 @@ createWidget("discourse-poll-buttons", {
           const age = relativeAge(closeDate.toDate(), { addAgo: true });
           label = I18n.t("poll.automatic_close.age", { age });
         } else {
-          const timeLeft = moment().to(closeDate.local(), true);
+          const timeLeft = moment().to(closeDate, true);
           label = I18n.t("poll.automatic_close.closes_in", { timeLeft });
         }
 

GitHub sha: 029d091e

This commit appears in #9656 which was approved by eviltrout. It was merged by jjaffeux.