# Insert Date Timezone is always UTC ; my Timezone is ignored

**URL:** https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307
**Category:** Support
**Created:** [August 20, 2019, 3:34pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307 "2019-08-20T15:34:02Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hewo7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hewo7/32/145060_2.png) [@hewo7](https://meta.discourse.org/u/hewo7)
#### Post date: [August 20, 2019, 3:34pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/1 "2019-08-20T15:34:02Z")

</div>

When I create a date with “Insert Date” Button it creates something like

`[date=2019-08-20 time=20:00:00 timezone="Europe/Berlin"]`

I’m on Timezone Europe/Berlin. But, the html result shows “22:00” instead of “20:00”.

When I change the generated code to:

`[date=2019-08-20 time=20:00:00 timezone=Europe/Berlin]`

it works like a charm.

Here at [meta.discourse.org](http://meta.discourse.org) it works correctly. My forum is at [v2.4.0.beta2 +316](https://github.com/discourse/discourse/compare/67f5cc1ce8da8d6301db0ab6ebcd6fc497f28455...tests-passed)

Thanks

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [August 20, 2019, 3:49pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/2 "2019-08-20T15:49:55Z")

</div>

Let’s try here, I’m in France, but it’s the same TZ

`[date=2019-08-20 time=20:00:00 timezone="Europe/Paris"]`

2019-08-20T18:00:00Z

`[date=2019-08-20 time=20:00:00 timezone=Europe/Paris]`

2019-08-20T18:00:00Z

results in

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/3/93dcda03c2275d57842453901434f30d79362d7d.png)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [August 20, 2019, 4:12pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/3 "2019-08-20T16:12:55Z")

</div>

Did you reconfigure your server time/time zone away from UTC?

---

<div class="post-metadata">

### Author: ![hewo7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hewo7/32/145060_2.png) [@hewo7](https://meta.discourse.org/u/hewo7)
#### Post date: [August 20, 2019, 5:05pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/4 "2019-08-20T17:05:45Z")

</div>

Yes, as I wrote here it works. I guess it is something in the diff from the version here to mine. I remember that it already worked before a couple of updates I made.

---

<div class="post-metadata">

### Author: ![hewo7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hewo7/32/145060_2.png) [@hewo7](https://meta.discourse.org/u/hewo7)
#### Post date: [August 20, 2019, 5:06pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/5 "2019-08-20T17:06:24Z")

</div>

No, it is still UTC.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 21, 2019, 5:58am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/6 "2019-08-21T05:58:51Z")

</div>

What’s your browser? It’s not related to your server, but is YOUR computer clock correctly configured?

---

<div class="post-metadata">

### Author: ![hewo7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hewo7/32/145060_2.png) [@hewo7](https://meta.discourse.org/u/hewo7)
#### Post date: [August 21, 2019, 6:52am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/7 "2019-08-21T06:52:33Z")

</div>

I tested Firefox and Chrome/Chromium on Windows, Linux and Android. On each browser it is the same behavior. Oh and my clock is always Europe/Berlin.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 21, 2019, 7:27am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/8 "2019-08-21T07:27:29Z")

</div>

Can you try this in the console of a browser currently browsing a discourse forum:

```plaintext
moment.tz.guess()

```

---

<div class="post-metadata">

### Author: ![hewo7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hewo7/32/145060_2.png) [@hewo7](https://meta.discourse.org/u/hewo7)
#### Post date: [August 21, 2019, 8:00am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/9 "2019-08-21T08:00:48Z")

</div>

> [@j.jaffeux](#):
>
> moment.tz.guess()

says: `"Europe/Berlin"`

at my forum as well as at [meta.discourse.org](http://meta.discourse.org)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 21, 2019, 8:01am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/10 "2019-08-21T08:01:43Z")

</div>

Ok will investigate in the next days, thanks for info.

---

<div class="post-metadata">

### Author: ![lorddevil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lorddevil/32/148809_2.png) [@lorddevil](https://meta.discourse.org/u/lorddevil)
#### Post date: [September 19, 2019, 6:38am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/12 "2019-09-19T06:38:27Z")

</div>

I am having the exact same issue! Without quotes it works like a charm. But the Discourse Editor always creates “Europe/Berlin” instead of Europe/Berlin - and in preview it shows wrong time then. Can this be fixed?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [September 19, 2019, 5:53pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/13 "2019-09-19T17:53:21Z")

</div>

I still have no repro whatever I try on chrome or firefox. Need to dig more.

---

<div class="post-metadata">

### Author: ![lorddevil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lorddevil/32/148809_2.png) [@lorddevil](https://meta.discourse.org/u/lorddevil)
#### Post date: [October 1, 2019, 5:54am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/14 "2019-10-01T05:54:51Z")

</div>

I had this issue on Safari, didn’t try chrome/firefox yet.

---

<div class="post-metadata">

### Author: ![Daniel\_Tesla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/daniel_tesla/32/138185_2.png) [@Daniel\_Tesla](https://meta.discourse.org/u/Daniel_Tesla)
#### Post date: [November 4, 2019, 2:38pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/15 "2019-11-04T14:38:21Z")

</div>

Any Updates on this Issue?

I have the same behaviour as mentioned above. As soon as I leave out the “” it all works fine. But when I use them the system seems to take the UTC +/- the hours of the timezone my client runs in.

Btw. the same occurs here when I write nonsense in the timezone like:  
`[date=2019-08-20 time=20:00:00 timezone="nonsense"]`  
or  
`[date=2019-08-20 time=20:00:00 timezone=nonsense]`  
2019-08-20T20:00:00Z

---

<div class="post-metadata">

### Author: ![v.stephan](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@v.stephan](https://meta.discourse.org/u/v.stephan)
#### Post date: [November 15, 2019, 11:17pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/16 "2019-11-15T23:17:48Z")

</div>

I also state the exact same problem. It more or less seems to be an issue with “German” installations.

Well, fun fact, I tried to reset settings by running [domain.de/wizard](http://domain.de/wizard) there I changed the locale to English US and walked through the complete wizard. With English setting I can paste times and they are shown correctly. Well is say for example Tomorrow 11:15 PM (Europe/Berlin) but I really putted 23:15 in German time. So it is displayed correctly.

When I wizard my forum back to “Deutsch” and pasting a new appointment with time … then the + 1 hour effect comes back again. (The times pasted in English setup are still displayed right).

So this does not seem to be a server time thing. Something seems to crash between localization of Europe and UTC.

Happy to test or give more advice if needed.

Running discourse in docker.

THX for further assistance!

---

<div class="post-metadata">

### Author: ![v.stephan](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@v.stephan](https://meta.discourse.org/u/v.stephan)
#### Post date: [November 15, 2019, 11:53pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/17 "2019-11-15T23:53:46Z")

</div>

Little addition, I realized a ¿small? difference, between my installation and this official one.

We deactivated the “allow user locale” option. So users are not able to change language by themselves. I don not know if this is helpful.

What is about the others that experienced the same problems, namely @Daniel_Tesla @lorddevil, @zogstrip @hewo7 can your users change their interface locale settings. Or in german under Settings › General Settings: **allow user locale** : “Erlaube Benutzern, ihre eigene Oberflächensprache zu wählen”

_Poll ([view on site](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/17))_

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [November 20, 2019, 5:03pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/20 "2019-11-20T17:03:41Z")

</div>

It’s weird that the current locale would affect the timezone 🤔

@j.jaffeux did you fix this by any chances with your recent fixes?

---

<div class="post-metadata">

### Author: ![v.stephan](https://avatars.discourse-cdn.com/v4/letter/v/85f322/32.png) [@v.stephan](https://meta.discourse.org/u/v.stephan)
#### Post date: [November 20, 2019, 5:04pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/21 "2019-11-20T17:04:55Z")

</div>

I would be happy to give further assistance for tests and debugging if necessary. If some from the team wants to get a closer look into the topic.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [November 20, 2019, 5:06pm UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/22 "2019-11-20T17:06:37Z")

</div>

No I will give it a look tomorrow

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [November 21, 2019, 10:48am UTC](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307/23 "2019-11-21T10:48:36Z")

</div>

This should be fixed by:

[https://github.com/discourse/discourse/commit/3d1b6b6729eab386f5e7f2c786fd521c37fd8f05](https://github.com/discourse/discourse/commit/3d1b6b6729eab386f5e7f2c786fd521c37fd8f05)

🎉 Thanks for info

* * *

More context, it seems like that when Discourse instance is set to german locale, we will replace quotes `"` by german quotes `„“` which was breaking our parser.

@gerhard I made a fix directly into local-dates for now, do you think we should try to fix it higher in the chain?

- `parseBBCodeTag` itself before sending the matched string?
- in pretty text?

[Next page](https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307.md?page=2)
