How to override timezone in 'event.timestamp' for workflow emails?

BalvinderKalra

30-09-2020

In our project we are using Adobe OOTB workflow steps in our custom workflows, the workflow email are utilizing the template located at /etc/workflow/notification/email/default/en.txt . This txt file has a variable as Time: ${event.TimeStamp} with the value coming in emails as as Time: Mon Sep 28 16:55:50 UTC 2020 (sample value)
Now our requirement is to override/change this variable, So that it picks up local timezone of aem users, So can you guys please help me a way of modifying this UTC timezone to local timezone of users?

Could you please tell me:

1) Is there a way of modifying this UTC timezone to local timezone of users?

 

@Nikhil-Kumar 
@ChitraMadan 
@Darren_Bowers 
@sunjot16 
@workflowuser 

override timestamp workflow email workflow email notification

Accepted Solutions (1)

Accepted Solutions (1)

vanegi

Employee

13-10-2020

I have tested the use case in my local AEM machine and started my cq jar with an extra argument Duser.timezone=America/New_York and could see that AEM server is on EST timezone by verifying in system properties file [0].

 

[0]:- http://<host:port>/system/console/status-System%20Properties

 

 

Upon checking the timezone in workflow schedule screen, I could see it is taking user time zone and not the server one. The following message is shown in the screen "Your timezone (UTC+05:30) will be used instead of the server setting (UTC-0400)". I then re-verified the same with our internal team and it is an expected behavior, AEM takes user/author based timezone not the server one in these authoring activities. Below is the ticket reference of the discussion with our product team:-

 

[1]:- https://jira.corp.adobe.com/browse/CQ-27972

 

Thanks!!

Answers (0)