# Le paramètre régional français par défaut affecte le décalage horaire !

**URL:** https://meta.discourse.org/t/default-french-locale-affects-timezone-offset/172255
**Category:** Bug
**Created:** [December 4, 2020, 2:22pm UTC](https://meta.discourse.org/t/default-french-locale-affects-timezone-offset/172255 "2020-12-04T14:22:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [December 4, 2020, 2:22pm UTC](https://meta.discourse.org/t/default-french-locale-affects-timezone-offset/172255/1 "2020-12-04T14:22:24Z")

</div>

Hello,

I noticed that when changing the default locale (e.g., from English to French), the dates are affected. I do not think they should, given that languages and timezones are not supposed to be linked – you can speak a language regardless of your location, and most colonizer languages are spoken across timezones.

E.g.,

given the same date entry on various instances using multisite (or not – but it also fails on the same multisite install), from the same computer with the same timezone configured for the user:

`[date=2020-12-04 time=10:00:00 timezone="Europe/Brussels"] → [date=2020-12-04 time=15:00:00 timezone="Europe/Brussels"]`

On English by default sites I get the expected time :

![image](https://global.discourse-cdn.com/meta/original/3X/0/7/075c1c648c4befc61db10c35e8d6a93e01e28cd1.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/4/c/4cc2297755e08270d5597a52268075f63d6e3fe7.png)

While on French by default instances the time offset is wrong:  
 ![image](https://global.discourse-cdn.com/meta/original/3X/b/0/b06a6cd569f945d56e411d6a5e0ca399678e8c62.png)

Here’s what shows up here in Meta:  
2020-12-04T09:00:00Z → 2020-12-04T14:00:00Z

I noticed the offset on earlier version but only made the link with default locale setting now, so I cannot report an affected version. I just tried on the `stable`: it’s affected with French but not with Spanish, so maybe it’s only a French thing – which would not be surprising, the French have this certainty of controlling spacetime. 😉

cc @zogstrip

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [December 4, 2020, 6:35pm UTC](https://meta.discourse.org/t/default-french-locale-affects-timezone-offset/172255/2 "2020-12-04T18:35:47Z")

</div>

This certainly was a peculiar bug. I reproduced it and have a fix in review:

> <https://github.com/discourse/discourse/pull/11408>
>
> You might wonder why this matters. It turns out in some locales like
> French, we… replace quotation marks with « and » -- this should likely
> not happen before BBCode is parsed but that is not the case for this
> plugin. The plugin has code to handle this situation, but it means extra
> spaces are inserted around the time zone which breaks it.
> 
> This fix allows us to supply extra whitespace and will show the correct
> time zone.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [December 4, 2020, 6:35pm UTC](https://meta.discourse.org/t/default-french-locale-affects-timezone-offset/172255/3 "2020-12-04T18:35:56Z")

</div>


