Ignored user time zone for poll closeDate display

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.)

  • option1
  • option2

0 voters

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

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

2 Likes

cc @joffreyjaffeux perhaps?

3 Likes

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

3 Likes

That should fix it

https://github.com/discourse/discourse/pull/9656

3 Likes

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