# 静默和暂停警告中的自定义日期和时间错误

**URL:** <https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297>\
**Category:** Bug\
**Created:** [2022 年5 月 6 日 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:** 1\
**Showing post:** 8

<div class="post-metadata">

作者： ![andrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrei/32/205142_2.png) [@andrei](https://meta.discourse.org/u/andrei)\
发布日期： [2022 年5 月 25 日 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>

这可以修复在静默和暂停用户时电子邮件中的日期。日期将转换为用户的时区：

> <https://github.com/discourse/discourse/pull/16918>
>
> This fixes one of the problems reported in https://meta.discourse.org/t/wrong-cu…stom-date-and-time-in-silenced-and-suspended-warnings/226297/2.
> 
> When silencing or suspending a user, we send a date in UTC instead of sending a date in user's timezone, which is confusing.
> 
> For example a user in GMT+1 who was suspended until \_8 May 2022 17:25\_ will receive this email:
> 
> !\[aac0e0c441f8a516b244f3d30efa5c60cdeab65e\](https://user-images.githubusercontent.com/1274517/170274510-61a4453d-c8e6-4bab-afb1-a334b700c879.png)
> 
> This PR fixes both silencing and suspending emails. Mails will be sent with date and time in user's timezone. If a user haven't set up timezone, dates will be sent in UTC.

接下来我们需要修复舍入问题。我正在处理这个问题。

---

_[View the full topic](https://meta.discourse.org/t/wrong-custom-date-and-time-in-silenced-and-suspended-warnings/226297)._
