Wrong custom date and time in silenced and suspended warnings

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
  2. Set a reason and a custom email message
  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

On the user card it shows until May 13, 2022 at 00:00
Screenshot 2022-05-06 at 9.58.48
Same on admin page.
Screenshot 2022-05-06 at 10.13.22

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 :slightly_smiling_face:

3 Likes

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):





And for a custom suspension of 1 week:




image

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. :slightly_smiling_face:

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. :thinking:

3 Likes

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

3 Likes

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

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

3 Likes

The rounding bug was just fixed by @joffreyjaffeux in

3 Likes

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