plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
246 stars 187 forks source link

Berlin’s instead of Paris’ default time zone for French Plone sites #2951

Open dbitouze opened 5 years ago

dbitouze commented 5 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

I installed a fresh Plone 5.2 (python3) instance and started to create a new Plone site. Maybe because of the locale LANG=fr_FR.UTF-8 on my Linux box, the automatically selected language for the Plone site was French.

What I expect to happen:

I expected the automatically selected time zone to be Paris.

What actually happened:

The automatically selected time zone was Berlin.

What version of Plone/ Addons I am using:

jaroel commented 5 years ago

Thank you for your report!

For whom is willing to work in this: If we're already shipping with moment.js then we can use https://momentjs.com/timezone/docs/#/using-timezones/guessing-user-timezone/. If not we could ignore IE11 and use Intl.DateTimeFormat().resolvedOptions().timeZone . IMHO the added value isn't that high that I would add polyfills for IE11.

dbitouze commented 5 years ago

Aside remark (from this thread): I'm not sure what made Plone aware of my default language. If it is derived it from the locale of my computer (LANG=fr_FR.UTF-8), it could be nice for it to derive the time zone from LC_TIME. Hence for a computer of a French Canadian user with LANG=fr_CA.UTF-8 and LC_TIME="fr_CA.UTF-8", Plone would select automatically: