Forums

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

created > startOfDay("+3h") and createdDate < startOfDay("+18h") - Time zones

Bojan Virag
Contributor
September 23, 2021

So I ran into an interesting problem. I want to filter for tickets created at a certain time of day. But in a different time zone than system time in Jira. And this time period overlaps over two days in system time in Jira.

For example:

System time 0:00   My time: 9:00

I want to filter for tickets My time: 3:00-18:00

In System time that is: Yesterday 18:00 - Today 11:00.

The query is running in System time.

Any ideas how to express that in JQL?

2 answers

0 votes
Gaurav
Community Champion
October 1, 2021

Hello @Bojan Virag 

As per my understanding, there is a 9-hour difference between your time zone and system time zone.

You need to filter all tickets between 0300 hours and 1800 hours of your time zone; this translates to tickets created between 1800 hours (day - 1) and 0900 hours in the System Timezone.

As we need to look at data from yesterday and today (in System Time Zone), it would be pertinent to know when is this query being run. Assuming it is being run at 1000 Hours system time zone, the query can be:

created >= "-16h" AND created <= "-1h"

This can be further customized to suit your use case.

0 votes
Suvarna Gaikwad
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.
September 23, 2021

@Bojan Virag Click on your profile icon on top right corner of your Jira server and click on to see your profile.

Edit My Preferences and select timezone to match your local time. Save settings.

Then run your query again. It should now give result according to your local time.

Bojan Virag
Contributor
September 23, 2021

Thanks for your reply @Suvarna Gaikwad . The problem is I am not running this query, but it is a query ran in Slack integration triggered by Create ticket event.

Suvarna Gaikwad
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.
September 23, 2021

@Bojan Virag I would still suggest to try changing timezone preference in your jira settings as eventually slack is authenticated against your jira account only.

Bojan Virag
Contributor
September 23, 2021

Thank you, but it is already set to my local time. My experience is different and result differes between when I run the query and when it is ran by Slack integration.

Suggest an answer

Log in or Sign up to answer