# Onjuiste aangepaste datum en tijd in waarschuwingen voor stilgelegd en geschorst

**URL:** https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297
**Category:** Bug
**Created:** [6 mei 2022 om 08:25 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297 "2022-05-06T08:25:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [6 mei 2022 om 08:25 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/1 "2022-05-06T08:25:45Z")

</div>

Hello,

I noticed the suspend and silenced warnings and emails contains wrong date. Sorry if I missed something about this.

Repro

1. Set up a (custom date and time) on suspend modal. I seted up a week suspend.  
 ![Screenshot 2022-05-06 at 9.46.07](https://global.discourse-cdn.com/meta/original/4X/5/a/a/5aae6476e1ca21f4156901dd13ed3d96e549f30a.png)
2. Set a reason and a custom email message  
 ![Screenshot 2022-05-06 at 9.54.42](https://global.discourse-cdn.com/meta/original/4X/1/5/f/15f88d6102f324527e416e3c0fb24930d2f2fd07.png)
3. Click the suspend button

* * *

In the email it says until May 12, 2022 at 22:00

 ![Screenshot 2022-05-06 at 10.00.31](https://global.discourse-cdn.com/meta/original/4X/3/3/b/33bb4cf827738fbb02464f7c9242f1427594401e.png)

On the user card it shows until May 13, 2022 at 00:00

 ![Screenshot 2022-05-06 at 9.58.48](https://global.discourse-cdn.com/meta/original/4X/d/4/d/d4d6d6fd7c8ba990fd9d3f3082f313c3c5a6342c.png)  
Same on admin page.  
 ![Screenshot 2022-05-06 at 10.13.22](https://global.discourse-cdn.com/meta/original/4X/5/b/1/5b1561413b14e0af41384b857067e462324fff1d.png)

I think on the user card and admin the time should be 9:32 and in the email the date and time both wrong.

Thanks 🙂

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [7 mei 2022 om 17:01 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/2 "2022-05-07T17:01:14Z")

</div>

I’ve been having a little play with this and there does seem to be some discrepancy between times/dates input and time/dates displayed.

For a suspension of 1 day (the pre-entered default):

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/5/f/75f6cfb204f8b98120da2c28b2bf22f57770d026.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/8/9/5/89561ac02dbdb39bfbc4fcc2c1856184cdc5cb39.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/0/2/8/02817ba65e20c7daa5f286ad1c322bea058f882e.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/a/a/c/aac0e0c441f8a516b244f3d30efa5c60cdeab65e.png)

* * *

And for a custom suspension of 1 week:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/6/5/c65a2b049c6a87af54fe73be64c86ad49a4e9029.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/8/d/9/8d9185a799f78bba6640c1e30a20e3cbafa3d40b.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/7/b/1/7b15c766aac4aa7059b8a17de46dc27e457c28e3.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/1/b/2/1b2499becc6a435207ab49cb308f77d8cad00c39.png)

In both cases the email was an hour off, and any suspension longer than a day rounded out the time to midnight, and also knocked a day off the date in the email version.

**Edit:** Making sure I got all the right screenshots along the way clouded my thinking. 🙂

It’s because it’s knocking an hour off 00:00 which causes it to be a day early. So, it’s more about the lost hour between input and email. And @Don lost two. 🤔

---

<div class="post-metadata">

### Author: ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)
#### Post date: [24 mei 2022 om 17:43 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/6 "2022-05-24T17:43:44Z")

</div>

I can reproduce all problems. I’ll take a look at it.

---

<div class="post-metadata">

### Author: ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)
#### Post date: [25 mei 2022 om 15:41 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/8 "2022-05-25T15:41:04Z")

</div>

This fixes date in emails both when silencing and suspending users. Dates will be converted to user’s timezone:

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

Next we need to fix the rounding issue. I am looking at that.

---

<div class="post-metadata">

### Author: ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)
#### Post date: [27 mei 2022 om 10:11 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/10 "2022-05-27T10:11:56Z")

</div>

The rounding bug was just fixed by @j.jaffeux in

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

---

<div class="post-metadata">

### Author: ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)
#### Post date: [31 mei 2022 om 04:00 UTC](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297/11 "2022-05-31T04:00:03Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
