Jump to content

{{.H_datelogged}} in Email Template

Daniella R. Goral

Recommended Posts

Good day to all, 

In creating an email template, we find that the {{.H_datelogged}} comes out at a different time than the timezone of the Customer. Is there a way to log the actual logged time based on Customer Timezone? 


Example: Request {{.H_pk_reference}} has been assigned to your team {{.H_fk_team_id}} on {{.H_datelogged}}

This returns: 


Request SR00001641 has been assigned to your team MD on 2021-03-30 10:53:39Z 

The Customer had really logged this at 6:53:39.


Thank you for your help, as always!

Link to comment
Share on other sites

6 minutes ago, Daniella R. Goral said:

logged time based on Customer Timezone

@Daniella R. Goral not quite. The issue with dealing with multiple timezones is that 6:53 looks fine for the customer for example, but will look incorrect for someone else receiving the email who is in a different timezone. Even if that would be let's say ok for your analysts, the customer might forward the email within their own organisation who in turn might have users in multiple timezones and again that 6.53 won't look right anymore.

What we would advise is to use a so called "common denominator". You can format the date/time value in the email based on the instance timezone. Then in the email you can specify that the date/time is GMT or PST (or whatever the timezone configured in the instance). This will eliminate any confusion as of what the actual time is.

The date/time can be formatted as follows: 

{{.datetimevariable|formatLocalTime}} = Allows formatting of datetime variables using system regional settings (system.RegionalSettings.timezone & system.RegionalSettings.dateTimeFormat), without this formatting the date time will use the DB value (UTC).


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...