Hello community,
I have a simple automation rule that set OLA/SLA target times based on creation date-time of a given ticket.
As I want to setup different timezones depending on the project/customer location (so timer is set on local time), and understanding that ticket creator personal settings are being taken to define the timezone, I want to make sure that the times are always converted to the expected timezone for that given project (e.g. Europe/Madrid).
To do so, im using the following expression to edit a custom field:
- {{issue.Created.convertToTimeZone("Europe/Madrid").plusMinutes(15)}}
The expectation is that irrespective of the timezone setting of the ticket creator (even if not defined, it will take default system value), the creation date is always converted to the timezone I define, but this is not working properly. Here some real examples:
- This rule takes the creation date and convert it to Bolivia time (using canonical id as indicated in documentation), and add the defined time (15mins and 4hours for Response Time and Resolution Time respectively):
- Rule Config:
- Creation date timestamp for a random ticket chosen:
- The expected results for automation are:
-
OLA Response Time Target = May 12, 2022, 5:32 AM ----> Bolivia timezone (-6 hours from my time) + 15 mins
-
OLA Resolution Time Target: May 12, 2022, 9:17 AM ----> Bolivia timezone (-6 hours from my time) + 4 hours
- Actual results are:
-
OLA Response Time Target = May 12, 2022, 11:32 AM ----> Madrid timezone (the same timezone defined on my profile) + 15 mins
-
OLA Resolution Time Target: May 12, 2022, 3:17 PM ----> Madrid timezone (the same timezone defined on my profile) + 4 hours.
Tried changing convertToTimeZone to SetTimeZone expressions among many other combinations, but always get unexpected results. Not sure if al this is correcto and this is because of the viewer will always see the datetime on local time; if Im doing something wrong; there is a config that overwrites/mess-up my calculations... or it this post does make any sense at all 
This is a key setup I need as I have multiple projects and countries all over the world so want to make sure the timezone are always correct, irrespective of creator or system config.... Any hint?
Thanks in advance,
Esteban