You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I have an automation set up to comment on a ticket the date/time stamp of when it was created. Inside of that comment, in addition to the date/time stamp, I want it to be displayed as well in GMT +2.
It looks like GMT+2 isn't on the list of timezones here: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html#of-java.lang.String-
I am also struggling to understand the ZoneOffset normalize() instructions.
What smart value could I use to convert a date/time stamp to GMT+2. I also want it displayed as fullDateTime
I have tried
{{issue.created.setTimeZone("GMT+2")}}
Hi @Julia - This worked for me (I used EET because I'm lazy 😉)
{{issue.created.setTimeZone("EET").longDateTime}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira documentation pointed me to here and it shows EET as +2:
joda-time.sourceforge.net/timezones.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the Atlassian document I linked in the initial post, it doesn't look like we can just use any timezone, they have specific ones available
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So the issue is that you need to use convertToTimeZone. setTimeZone is just applying the desired time zone value, which is kind of a silly smart value to me as I would think you could just hard code it in if you wanted to set that. But I digress... Here's what did the trick for me:
{{issue.created.convertToTimeZone("GMT+2").longDateTime}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's what worked for me...
(I live and work in Melbourne)
{{created.convertToTimeZone("Australia/Sydney").jqlDateTime}} </td>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.