Users reported a bug in Discourse 2.6.0.beta4 where the date picker displays incorrect times when using the Europe/Paris timezone, particularly when French quotation marks (« ») are involved. rgrunbla first noted the issue, and Benjamin_D identified it as a problem with quote handling in French locale, referencing a similar German locale fix. j.jaffeux proposed a fix by normalizing quotes in the markdown parser, but Benjamin_D found inconsistencies — some quote formats worked while others didn’t, and the issue persisted in preview mode. Debugging revealed that the data-timezone attribute was missing for malformed quotes, suggesting HTML escaping or frontend conversion issues. j.jaffeux confirmed the fix normalized quotes correctly but suspected additional frontend issues, as quotes were being converted before reaching the parser. Eventually, Benjamin_D confirmed the issue was resolved in a later PR (#11408), celebrating the fix with a GIF. The root cause was improper handling of non-ASCII quotation marks in localized markdown, affecting timezone parsing.
My discourse ( 2.6.0.beta4 ) is configured with the Europe/Paris as the discourse local dates default timezones, but when I try to pick a time, the displayed time is wrong, as shown on this screenshot:
Even if I write “20:00:00”, the displayed time is “Today, 22:00”. The moment.tz.guess() executed in my browser gives “Europe/Paris”, so I don’t really guess what I’m doing wrong.
Technically this is more a pretty text/markdown bug than a local dates bug, we might want to have a more global solution to this. Although I have only had complaint of this in the local dates context, I guess it’s because it’s more used and more likely to be hand edited.
well of course! but you lost me there I assume you’d like a rails log ? I really not an expert, just a bit enthusiast!
And sorry, I misread a five for a six or I don’t know, the third one only doesn’t work, my bad, the fourth one doesn’t work in the preview but is right in the cooked post
I’m sorry to even ask, I’ll let you work after that, I was under the impression that it was the ; of the \« which makes && moment.tz.names().includes(config.timezone) fails
Could config.timezone be html escaped ?
So what you ask is basically what I do but not at the time you expect it, that could work too probably. So for example prior to my fix, something like:
I think something is going on “further down the line” , I actually don’t know where . \« and \» are introduced.
Ah yes ! I can see it in the composer preview [date=2020-12-15 time=14:00:00 timezone="Europe/Paris"
gives [date=2020-12-15 time=14:00:00 timezone=« Europe/Paris »
Yes maybe there are two issues front and back, because the previous fix improved deutsch case for sure, I think I can just apply the same regex frontend, I wish I could repro this