Discourse 本地日期在电子邮件中需要更好的展示

The Discourse local time displays wonderful dates in the web UI. However in emails it can be very very confusing.

For example: May 18, 2018 11:03 PM will display as May 19, 2018 9:03 AM in an emails which leaves recipients very confused.

I propose a multi step approach to improving this.

  • Immediate change… just display time zone with the time in emails so we would have May 19, 2018 9:03 AM Australia/Sydney

  • Longer term change, start storing local time zone in the user profile table (detect via JS and hand to server with a header). Then in emails we can send the times in the “last know local timezone”

  • Longer Longer term, allow users to control preferred timezone in user profile (automatic vs manually set to something)

14 个赞

Hmm we need to get that immediate fix in #1 for the 2.0 release at least cc @j.jaffeux

2 个赞

Working on it, but I still don’t understand why you say that it will display as May 19, 2018 9:03 AM in an email. This is not what will happen, it will display:

May 19, 2018 09:03 AM (Australia: Sidney)

The issue is that it will display all timezones set when configuring the date, and you might end up with something very verbose. So yes we will need step2, to have something cool here, so you say send this email to this user living in Australia/Sidney timezone

This is now done. We need to work on step 2 in the future, it will really make it very cool.

6 个赞

I am not clear why “all” time zones need to be shown? Why not simply default to UTC in emails for now as a short term 2.0 fix?

2 个赞

Im showing only one now, honestly we can just put UTC if you want, if we are moving soon to something else I don’t have strong opinions on this.

2 个赞

Ok one is fine that works for me!

Will be fixed by:

5 个赞

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

这是一个关于如何改进此功能的建议

  1. 邮件中的时区应基于帖子中设置的原始时区
    如果我设置的时区值为
    [date=2019-12-15 time=23:59:00 timezone="EST"]
    那么它应该以这种方式通过邮件发送。

  2. 允许在此论坛设置中对时区进行更好的格式化:
    image
    目前功能略显局限:
    image
    (以防我们需要显示时区的完整名称或其他更复杂的格式化样式)

目前功能略显局限:
image

  1. 或者,允许管理员在设置中选择发送邮件时使用的时区,例如提供一个类似以下的切换选项:
    discourse local dates email format timezone
2 个赞