Setting Timezone for XLD EmailNotificationTrigger

Follow

Shashank Srivastava -

Scenario

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>

Using above approach, timezones can be set by changing 

${task.startDate?datetime("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")?iso_m_nz("GMT+05")} to suitable value.

Cause

This enables XLD user to see the deployment actions in real-time inside E-mail reports.

Additional Information

Attached is the sample_html_email_notification_trigger.html which can be used as the HTML template for EmailNotificationTrigger.

Tags

 XLDeploy, EmailNotificationTrigger, Timezone

Have more questions? Submit a request
Powered by Zendesk