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}}
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.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.