Incorrect or buggy date/time formatting


#1

Times don’t render properly for me; discourse seems to think my time zone is utc.

image


#2

I’ve had issues with getting the date/time formatting right (perhaps from manually editing the markup, which seems easier to break than I’d hope, and I don’t fully get the exact correct markup structure). I redid that thread. See if it works now.


#3

Still bugged on my computer. Works fine on Android.


#4

Weird. Sounds like Discourse isn’t recognizing your time-zone correctly. Try a test at meta discourse (like report the bug and post a date/time within the report post as a test)?


#5

Also works fine on chromium and epiphany. Seems to be a Discourse+Firefox bug (it also happens on Windows and on Fedora with a clean profile).


#6

Can confirm this, also on Firefox. Works fine on Eolie.


#7

Made this

https://meta.discourse.org/t/on-firefox-time-zone-not-recognized-for-date-time/102240

UPDATE: you using a screenshot was confusing me, I just saw the bug in your screen shot! I’m still not experiencing it.

Maybe one of you who see the bug can reply on that thread


#8

@wolftune: thanks. Here are a few details if it helps.

Affected browser/OS: Firefox 63/Arch Linux

Post content: date tag (e.g. smichel’s screenshot) and post timestamps (the one shown when the cursor is hovered over the relative time)

Env output:

$ date
Sat Nov 17 14:42:59 EST 2018
$ date -u
Sat Nov 17 19:43:01 UTC 2018
$ timedatectl | grep zone
Time zone: EST5EDT (EST, -0500)

JS console output:

Intl.DateTimeFormat().resolvedOptions().timeZone
"UTC"
moment.tz.guess()
"Etc/UTC"

#9

I relaunched Firefox without a config, letting it create a new one at ~/.mozilla and the local time shows correctly for me. Haven’t yet found the source causing the js library to guess the wrong timezone.

Intl.DateTimeFormat().resolvedOptions().timeZone
"EST5EDT"
moment.tz.guess()
"EST5EDT"

#10

Looks like this might be related to enabling privacy.resistFingerprinting in about:config. https://support.mozilla.org/en-US/questions/1191823


#11

Good find, thanks!

I thought it might be related to a privacy setting, but it wasn’t tracking protection. Completely forgot about resist fingerprinting, confirmed toggling this changed the timezone display.

In Discourse, the date tag allows adding timezones to show on cursor hovering over the date tag display. At least for meeting time display it may help a bit if the most common timezones (e.g. tz of active volunteers) are listed.

[Meta comment: I marked your post as the solution, but should have left it for you as OP to do so, hence removed it again.]