Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation displaying incorrect Date/Time

Cristina Carrillo
Contributor
July 25, 2023

As the title state, I have two different automations which are displaying a full day ahead instead of the current date. I have seen other posts regarding the same issue without any real resolution. Any advice on how to correct this?

 

First Automation is set to Phoenix/Arizona timezoneScreenshot 2023-07-25 at 8.43.29 AM.pngScreenshot 2023-07-25 at 8.43.48 AM.png

Second Automation is set to nowScreenshot 2023-07-25 at 8.45.07 AM.png

Both automations are display July 25 instead of July 24. 

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
July 25, 2023

Hello @Cristina Carrillo 

What is your personal time zone setting in your Atlassian Account profile?

Cristina Carrillo
Contributor
July 25, 2023

America/Phoenix

Trudy Claspill
Community Champion
July 25, 2023

What are you trying to accomplish by applying a timezone conversion when setting the field value?

Cristina Carrillo
Contributor
July 25, 2023

We measure SLA based on when issues are resolved with the customer not necessarily when the ticket is marked as resolved.

But with the automation it is setting SLA as + one day instead of the actual day. I read that it could be a timezone issue and try adding a conversion to the current timezone, but that is still not working.

Trudy Claspill
Community Champion
July 25, 2023

In the backend all date/times are stored as UTC. This is to avoid any confusion and need for the user to convert dates and times.

What you see in the UI is an automatic conversion of that UTC to the timezone you have set in your Atlassian Account Profile.

You should not have to apply any timezone function to now. The UI will automatically convert it to the correct timezone for the user viewing the issue, based on the user's Profile.

 

As to the unexpected value you see as a result of your rule:

I see that the documentation says this function "sets (not converts)" a time to the specified timezone.

So, if the current time is noon in the America/Phoenix timezone, the value of now is initially 7 pm. 

When you apply the setTimeZone function you are telling Jira to read that as 7 pm Phoenix time.

When you use that to set the value of a field, when it gets stored in the backend it is being converted to UTC. 7pm Phoenix time would be 2 am the tomorrow in UTC.

In the UI that UTC will be converted to your Profile timezone setting, which should then display it as 7 pm the today.

I'm not sure if that aligns with what you are seeing, since you did not mention what the local time was when your rule was executed. It does align with what I experienced when I tested this myself using the Los Angeles timezone.

If you wanted to store a time other than now and make Jira understand that the date/time information you provided is a Phoenix time, then you would want to use the convertToTimeZone function instead.

Like # people like this
Cristina Carrillo
Contributor
July 25, 2023

Got it, okay makes sense. Assuming I would use something along the lines of {{now.convertToTimeZone(issue.reporter.timeZone)}}

Like Aleksandra Leesment likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events