1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

As Designed Email templates use wrong time zone information

Discussion in 'Resolved Bug Reports' started by Jon W, Mar 14, 2015.

  1. Jon W

    Jon W Well-Known Member

    If dates/times are included in email templates, then this can result in some very strange results due to the wrong time zone information being used.

    For a really obvious example, add the following to the top of the email template watched_thread_reply_messagetext (or watched_thread_reply as appropriate)
    HTML:
    {xen:datetime $reply.reply_date, 'absolute'}
    Set a user (user A) to watch a thread. Get another user (user B, in a different timezone) to respond to that thread.

    User A will receive an email, but the reply date will be in the timezone of user B.
     
    imthebest, Liam W and Brett Chitty like this.
  2. Mike

    Mike XenForo Developer Staff Member

    The function always uses the time of the visitor. Nothing changes based on who the email is sent to other than the language (and only if opting into that). As such, this is roughly expected. You would need to resolve this in your code.
     

Share This Page