Forums

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

Date and Date/Time mismatch

Marc Thomson
Contributor
August 21, 2023

I have an automation that is populating an issue's Due Date from another Date/Time custom field using this:

{{field."Change Date/Time".jiraDate}}

I have automation working when the Date/Time field has a time before 5:59 PM. When the time is set to 6:00 PM, the field populated using jiraDate moves to the next day.

This seems to be obvious that it's tied to a UTC conversion issue. Question is, how do I get the date field correct from the Date/Time field so they match?

1 answer

0 votes
Bill Sheboy
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 21, 2023

Hi @Marc Thomson 

Have you tried using the convertToTimeZone() function as part of your comparison condition?  That will ensure your math is based on the time zone you want to use.

Kind regards,
Bill

Marc Thomson
Contributor
August 23, 2023

Thanks for the suggestion, Bill. That didn't change anything though. Same result.

Bill Sheboy
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 24, 2023

Marc, would you please post images of your entire rule, including the details of your conditions and the edit action?  Thanks!

Marc Thomson
Contributor
August 24, 2023

Here's the rule config:
Screenshot 2023-08-24 103225.pngScreenshot 2023-08-24 103336.png

Bill Sheboy
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 24, 2023

What is the time zone setting for your personal settings, Jira profile?  How does that value compare to where you are located?

Marc Thomson
Contributor
August 24, 2023

GMT -6, which matches where I'm located.

Bill Sheboy
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 24, 2023

Thanks for that information. 

Can you also show how you tried to force to your time zone as part converting/copying the field from UTC date/time to just date (jiraDate)?  Doing that should have gotten to the correct date before removing the time component.

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