Forums

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

Automation in JIRA | Correct Timezone

Mareli
Contributor
August 13, 2024

Hello All, 

I created this automation to update the summary when a field value changes:

Screenshot 2024-08-13 at 16.57.53.png

I have managed to get the date format the way I want it but I am struggling to set the correct time in the summary. 

In the Automation the date field referees to customfield_12025 which is the "Start Date ann Time (DP)" field: 

Screenshot 2024-08-13 at 17.00.38.png

As you can see the time is set to 2:30 PM.

But when I trigger the Automation the wrong time comes up, the time reads 12:30 instead of 14:30 or 2:30 PM:

Screenshot 2024-08-13 at 17.02.24.png

I've tried the following to get the correct time:

  1. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm 'CAT'").convertToTimeZone(SAST)}}
  2. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm 'SAST'").convertToTimeZone(SAST)}}
  3. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm").convertToTimeZone(SAST)}}
  4. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm").convertToTimeZone(CAT)}}
  5. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm 'CAT'")}}
  6. {{issue.customfield_12025.format( "EEE, dd MMM yyyy HH:mm 'SAST'")}}

None of these seem to work they just leave out the date and time completely, like this:

Screenshot 2024-08-13 at 17.04.58.png

Any advice?

4 answers

1 accepted

4 votes
Answer accepted
Trudy Claspill
Community Champion
August 13, 2024

Hello @Mareli 

I have two recommendations.

First try swapping the time zone conversion and format functions. Both apply to a date/time value, but with the current order you are trying to apply timezone conversion to a formatted string. Try this order:

{{issue.customfield_12025.convertToTimeZone().format()}}

Second, I don't think the codes you are trying for time zone conversion are valid. In the documentation for the time zone conversion function...

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Convert-timezone-date---

...there is a link to a document from which you can get the valid entries to use for all the time zones.

https://joda-time.sourceforge.net/timezones.html

I don't see SAST or CAT in that list.

Mareli
Contributor
August 13, 2024

Hi @Trudy Claspill 

IT WORKED! 

Thanks so much:

Screenshot 2024-08-13 at 17.42.41.png

I used this one: 
{{issue.customfield_12025.convertToTimeZone("UTC+02:00").format("EEE, dd MMM yyyy HH:mm")}}

Like # people like this
0 votes
Yatish Madhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2025

Hey - so i am looking for something similar here, please?

If a user sets the datetime field to 1:30pm and their account settings timezone is America/New York - and I go to see it, the time shows as 10:30 PM for me (my timezone is Africa/Johannesburg)

How can i make the date time field static so it the same time for everyone REgardless of the account settings timezone?

Thank you in advance

Yatish

Trudy Claspill
Community Champion
July 25, 2025

Hello @Yatish Madhav 

The short answer is you cannot do that.

Date/Time fields in Jira are designed to change based on the timezone preference of the person viewing the data.

If you want a static value, you could consider copying the value from the date/time field to a text field.

But I would first ask you why you need the date/time to show a fixed timezone to all users. What problem are you trying to solve by doing that?

Trudy Claspill
Community Champion
July 25, 2025

@Yatish Madhav 

Additionally, given that this Question has an accepted answer and otherwise has not been updated in over 6 months, I recommend that you start a new thread for your help request by clicking on the Ask a question button at the top of the screen.

Updating an existing Question notifies only the original author, the people that replied and the people that are Watching the post. That greatly limits the visibility of your question to the wider community. If you start a new Question it will show higher in the list of Questions (sorted by create date DESC) and will show up in the Unanswered filter, resulting in greater visibility to the wider community and more people potentially providing suggestions.

Also, adding to a post that is over 6 months old is considered "necroposting" and is discouraged in the community Guidelines.

Like Marc - Devoteam likes this
Yatish Madhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2025

Thanks so so much, @Trudy Claspill - appreciate the answer and the recommendation. I will remember that in future. I never knew about necroposting as a bad thing until this comment. Thanks. I only commented here as it was more contextual to this post and thread.

RE my use case, it is around staff off boarding and we want HR teams to post the last date , hour and minute ... and being a global team, we need to know and capture (in some other automation) the date and time as it was logged REGARDLESS if the HR team member has timezone Africa/Johannesburg or America/Phoenix OR Australia/Sydney OR elsewhere. It was really confusing when I spotted the differences in time and figuring it out with user timezone settings.

Thank you

Yatish

0 votes
QASIM ALOUDAT
Banned
September 30, 2024

Hello

@QASIM ALOUDAT 

I am expect the country must pay for local timezone

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 13, 2024

Hi @Mareli 

Could you try {{issue.customfield_12025.jiraDate}}

Mareli
Contributor
August 13, 2024

Hello @Marc - Devoteam 

This one did not work it does not give me the time and also the format is not correct

Screenshot 2024-08-13 at 17.36.39.png

Suggest an answer

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

Atlassian Community Events