# 本地日期：日期显示未来天数

**URL:** https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408
**Category:** Bug
**Created:** [2019年六月3日 18:47 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408 "2019-06-03T18:47:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2019年六月3日 18:47 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/1 "2019-06-03T18:47:02Z")

</div>

For example:

```plaintext
[date=2019-06-05 timezone="America/Toronto" timezones="Africa/Cairo|America/Toronto|UTC"]

```

2019-06-05T04:00:00Z

shows up in preview and baked for me as:

> ![image](https://global.discourse-cdn.com/meta/original/3X/3/3/3343b376f177de7665e7f5cbf0f94fe1cba40e30.png)

UTC is not 52h in the future for me 😃 (it’s 4h ahead)

---

<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: [2019年六月3日 21:46 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/3 "2019-06-03T21:46:47Z")

</div>

I know @zogstrip was hunting for a bug of this kind the other day, will assign him for now.

---

<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: [2019年六月3日 21:57 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/4 "2019-06-03T21:57:55Z")

</div>

Ok, I’m not crazy 🤪

* * *

Leaving a note for future me, here’s what I see now

 ![image](https://global.discourse-cdn.com/meta/original/3X/8/b/8bca924b0ed8783b7ddb003cb2d11adaab7f7f03.png)

The timezones are all wrong here… Paris, Paris, UTC 🤔

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2019年六月3日 22:31 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/6 "2019-06-03T22:31:03Z")

</div>

> [@zogstrip](#):
>
> Paris, Paris

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/2/729cb69a38e3913043f359d7edc1e31061fb3bab.jpeg)

---

<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: [2019年六月3日 22:32 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/7 "2019-06-03T22:32:20Z")

</div>

Yeah, but it should show the ones in the `timezones` attribute… Not some apparently _random_ ones 😮

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2019年六月3日 22:36 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/8 "2019-06-03T22:36:28Z")

</div>

you know me - love my images

Also, yes, Paris and Paris aren’t 24h apart… 😃

---

<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: [2019年六月6日 09:20 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/9 "2019-06-06T09:20:33Z")

</div>

Pretty sure I fixed that in

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

We were mutating the same dateTime object when generating the previews (ie. the date ranges in the tooltip), thus creating a discrepancy in the space time continuum 💥 .

---

<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: [2019年六月6日 16:00 UTC](https://meta.discourse.org/t/local-dates-dates-show-days-in-the-future/119408/10 "2019-06-06T16:00:02Z")

</div>

This topic was automatically closed after 6 hours. New replies are no longer allowed.
