# Timezone bug

**URL:** https://meta.discourse.org/t/timezone-bug/248674
**Category:** Bug
**Created:** [December 12, 2022, 4:33pm UTC](https://meta.discourse.org/t/timezone-bug/248674 "2022-12-12T16:33:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [December 12, 2022, 4:33pm UTC](https://meta.discourse.org/t/timezone-bug/248674/1 "2022-12-12T16:33:30Z")

</div>

Just encountered this. Look at time in the the left popup when I click first-second-first.

For example 2022-12-13T14:00:00Z would be ideal, although I could also probably make 2022-12-13T13:30:00Z?

It only happens when the two dates are in the same paragraph, so pressing enter before “although” resolves the issue.

### Gif

![ShareX_P1flUbr0tX](https://global.discourse-cdn.com/meta/original/4X/2/d/5/2d53309064697d099ae770e737a58e6bcd8f8546.gif)

---

<div class="post-metadata">

### Author: ![twofoursixeight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/twofoursixeight/32/574822_2.png) [@twofoursixeight](https://meta.discourse.org/u/twofoursixeight)
#### Post date: [December 13, 2022, 2:28am UTC](https://meta.discourse.org/t/timezone-bug/248674/2 "2022-12-13T02:28:42Z")

</div>

I played around with the calendar feature and found some weird stuff, might relate to the bug.  
I am on mobile(iPad) by the way

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/5/3/1539191e705a5043c77aba864780bdb964375b35.jpeg)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/c/a/4/ca42d293d05015e937fbf1c2160b8d1df81e9d75.jpeg)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/8/7/7/877d2e29e474a51bee15dfc954e3f2f3b55544cb.jpeg)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/7/1/d71a758fc430b5e869b02dfe9f3ba4f358fcfb74.jpeg)

---

<div class="post-metadata">

### Author: ![ted](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ted/32/283882_2.png) [@ted](https://meta.discourse.org/u/ted)
#### Post date: [December 15, 2022, 2:58am UTC](https://meta.discourse.org/t/timezone-bug/248674/5 "2022-12-15T02:58:38Z")

</div>

Great catch! :eye:

When we added dedicated support for date ranges we also added a fallback for the old, “automagic” way of detecting them (i.e. are there two dates in the paragraph, if so consider it a range.)

This fallback relies on checking the number of child elements in the paragraph. When expanding the modal, the modal element is added as a child element as well. This is why there are different results when clicking a date depending on whether a modal is already open or not.

Working on a fix.

---

<div class="post-metadata">

### Author: ![ted](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ted/32/283882_2.png) [@ted](https://meta.discourse.org/u/ted)
#### Post date: [January 12, 2023, 10:58am UTC](https://meta.discourse.org/t/timezone-bug/248674/6 "2023-01-12T10:58:16Z")

</div>

This has been fixed in [PR#19477](https://github.com/discourse/discourse/pull/19477). :bowing_man:

[https://github.com/discourse/discourse/pull/19477](https://github.com/discourse/discourse/pull/19477)

---

<div class="post-metadata">

### Author: ![ted](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ted/32/283882_2.png) [@ted](https://meta.discourse.org/u/ted)
#### Post date: [January 12, 2023, 10:58am UTC](https://meta.discourse.org/t/timezone-bug/248674/7 "2023-01-12T10:58:29Z")

</div>


