Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,610
Community Members
 
Community Events
176
Community Groups

Is there a smart value to convert the created date of a jira ticket to GMT +2

Edited

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")}}
 

2 answers

1 accepted

1 vote
Answer accepted
Mark Segall Community Leader Feb 10, 2022

Hi @Julia - This worked for me (I used EET because I'm lazy 😉)

{{issue.created.setTimeZone("EET").longDateTime}}

Hey Mark - thank you. is EET the same as GMT+2 ?

Mark Segall Community Leader Feb 10, 2022

Jira documentation pointed me to here and it shows EET as +2:

joda-time.sourceforge.net/timezones.html

Thank you so much! 

Like Mark Segall likes this

Mark, hate to come back, but I tried that and it is displaying PST 

 

Screen Shot 2022-02-10 at 9.58.59 AM.pngScreen Shot 2022-02-10 at 9.59.55 AM.png

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 

Mark Segall Community Leader Feb 10, 2022

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}}

Here's what worked for me...
(I live and work in Melbourne)


{{created.convertToTimeZone("Australia/Sydney").jqlDateTime}}&nbsp;&nbsp;</td>

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events