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,553,276
Community Members
 
Community Events
184
Community Groups

Why is my date-time smart value resolving to 4 hours past the current time?

Phil Bustin
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.
Apr 17, 2023

The current time was 10:30 AM.  

{{now. shortDateTime}} in a text field resolved to 2:30 PM

A setting in System is:

Default user time zone (GMT-05:00) New York

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 17, 2023

Dates and times are stored in Jira Cloud in GMT.  You are seeing the current GMT time.

With Daylight Savings Time in the U.S., New York is actually only 4 hours behind GMT. It is 5 hours behind GMT when Standard Time is in effect.

Phil Bustin
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.
Apr 19, 2023

Thank you for your answer, but I am unfortunately not understanding it. 

The correct time displays in date/time fields after post-transition actions use %%CURRENT_DATETIME%%, but in an automation that resolves smart value {{now. shortDateTime}}, in a text field, the time displayed in the text field is 5 hours later.  4 hours later would still not be usable. 

The setting I see in Sandbox > System is Default user time zone (GMT-05:00) New York, which I interpret as NY (Eastern) time.  A discrepancy of one hour doesn't solve my problem, and if that were the problem, I would not know how to correct it.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 19, 2023

You stated:

 

The current time was 10:30 AM.  

{{now. shortDateTime}} in a text field resolved to 2:30 PM

That is a difference of 4 hours.

For consistency date/times are stored in the Jira database as GMT/UTC, so date/time smart values like {{now}} return the GMT/UTC time. That is why your smart value is showing the current time in terms of GMT/UTC.

You said the Default User Time Zone is (GMT-05:00). The stated timezones don't adjust for Daylight Savings Time. The difference between GMT and New York during Standard Time months in the U.S. is 5 hours. During Daylight Savings Time months the difference is only 4 hours. You can see this with apps/websites that show you the time in different timezones, such as

https://dateful.com/time-zone-converter

So, while the time per your time zone setting (GMT -5:00) is 10:xx am, the value for {{now}} will be 2:xx pm during Daylight Savings Time months. That is the answer to the question you asked. 

 

You have not stated what the problem is with the field displaying the GMT/UTC time rather than the equivalent time for your timezone preference.

If you want to convert the value from GMT/UTC to a specific time zone before storing it in the text field you can use the  convertToTimeZone function documented on this page.

Example: 

{{now.convertToTimeZone("Australia/Sydney").shortTime}}

Since the users of your system may have set different timezone preferences than the default, if you do convert the value to a specific timezone you may want to tack on text in that field that indicate which time zone the value is for.

 

(Side note: when you are viewing issues in the UI, Jira automatically converts the values shown in date/time fields from the stored UTC/GMT value to the time zone preference selected by the user.)

 

Phil Bustin
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.
Apr 19, 2023

Thank you.  While I'm waiting for my Tech Support to allow the URL in the link provided for valid inputs for time zone, if you know the input for US Eastern, please provide it.  My guess didn't work: {{now.convertToTimeZone("New York").shortTime}}

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 19, 2023

America/New_York

Like Phil Bustin likes this
Phil Bustin
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.
Apr 19, 2023

:-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events