# Ignored user time zone for poll closeDate display

**URL:** https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942
**Category:** Bug
**Created:** [April 30, 2020, 5:04pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942 "2020-04-30T17:04:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![benkeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benkeks/32/175218_2.png) [@benkeks](https://meta.discourse.org/u/benkeks)
#### Post date: [April 30, 2020, 5:04pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/1 "2020-04-30T17:04:34Z")

</div>

The close date of polls that is displayed when hovering the “Closes in …” info prior to closing time seems to be rendered in the server time zone.

One would rather expect it to be displayed in the same time zone as surrounding time info (e.g. the post date).

In the following poll, I set `close=2020-05-01T18:00CEST`. The hover title should thus render consistent with 2020-05-01T16:00:00Z. (For me, it says 4:00 PM instead of 6:00 PM.)

_Poll ([view on site](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/1))_

This might seem like a minor ux glitch. But as we are currently conducting binding votes in my community using this feature, it’s quite annoying to have “wrong” end times. I quick-fixed it for my instance by adding a `.local()` in the display widget JS at:

[https://github.com/discourse/discourse/blob/master/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6#L750](https://github.com/discourse/discourse/blob/master/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6#L750)

(But I’m not sufficiently familiar with Discourse to tell whether this is actually the right fix. 😬)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 1, 2020, 8:52pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/2 "2020-05-01T20:52:55Z")

</div>

cc @j.jaffeux perhaps?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [May 1, 2020, 9:09pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/3 "2020-05-01T21:09:56Z")

</div>

Sure can have a look, don’t know this code, but seems very straightforward, will fix by next week.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [May 6, 2020, 8:17pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/5 "2020-05-06T20:17:45Z")

</div>

That should fix it

[https://github.com/discourse/discourse/pull/9656](https://github.com/discourse/discourse/pull/9656)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [May 7, 2020, 8:17pm UTC](https://meta.discourse.org/t/ignored-user-time-zone-for-poll-closedate-display/149942/6 "2020-05-07T20:17:50Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
