Setting Timezone for XLD EmailNotificationTrigger

Sometimes, users want to receive E-mails about deployments(status like started/failed etc) in their own time-zone.

Environment

XLDeploy

Solution

This can be done by setting base timezone <#setting time_zone="CET"> as the first line in either Body of EmailNotificationTrigger or body tag of HTML template. After this, we need to change the report timezone using something like below snippet. Here, the timezone is set to GMT+5 so as to receive mails in GST timezone.

<p>Deployment started at ${task.startDate?datetime("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")?iso_m_nz("GMT+05")} and completed at ${task.completionDate?datetime("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")?iso_m_nz("GMT+05")}.</p>