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

Defaut time not synch to current time

Zaldy Parian
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 25, 2023

Hi all,

I create a custom field to take the current date and time when an issue is created.  

However, the default time is not the same as the current time. In my example below, the default is showing as 11:25PM, when I created that on 1:25PM as shown in the system date on my computer.

How can I fix this?

datenotsynch.png

2 answers

1 vote
Peter_DevSamurai
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 25, 2023

The issue you're describing, where the time recorded in a custom field is different from the system time when the issue is created, often relates to a timezone discrepancy between Jira and your local system or a misconfiguration in your custom field settings. Here are a few steps that can help you resolve this issue:

1. Check the Timezone Settings in Jira:
- Go to your profile avatar in the top right corner, and select Profile and Visibility.
- Check the Time Zone in the Preferences section and ensure that it matches your local time zone.
- If it doesn't, adjust it to the correct time zone.

2. Verify the Server Timezone:
- If you are a Jira administrator, verify that the server's timezone is correctly set, as it may also impact the recorded time.
- Navigate to System Settings > General Configuration > Advanced Settings. Check for jira.default.timezone and ensure it’s correctly set.

3. Revisit Your Custom Field Configuration:
- Check how you have configured the custom field that stores the date and time.
- Ensure that there are no scripts or automation rules altering the recorded value inadvertently.

4. Automate with a Post Function:
- If the custom field is intended to capture the creation date and time automatically, consider using a post function on the Create Issue transition in the workflow to set the value of this field to the current date and time.

5. Use Jira Misc Custom Fields:
If you have the Jira Misc Custom Fields (JMCF) app installed, you can create a Calculated Date-Time Field that captures the creation date and time accurately.

Zaldy Parian
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 25, 2023

Hi @Peter_DevSamurai ,

Thanks for your quick reply.

1. The time zone and language settings are all correct.

2. I can't find the jira.default.timezone from Settings > System > General configuration. 

3. The only configuration on the custom field is to take the current date and time. If I remove the tick mark on this option, then the field will be blank on create.

4. For the post function, this may not address the business requirements because this will only take effect after saving the issue. 

5. I'll check this app if this can be used. But we are trying to avoid any of new app to be added into our cloud system.

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.
September 26, 2023

Hello @Zaldy Parian 

Jira Cloud stores all date/time values as UTC in the database, so I expect what you are seeing there is the UTC time.

Looking at the discrepancy you noted between your time of 1:25 pm and the default time of 11:25 pm, do you happen to be in a timezone that is 10 hours behind UTC?

On a side note, since the date and time of creation is already saved in the built in Created field, what is the use case for having a second, custom field to have that same information?

Like Aaron Geister likes this
Zaldy Parian
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 26, 2023

Hi @Trudy Claspill ,

The time discrepancy is due to the time value when I set up the Default value (it took the current time). And when creating an incident, whatever the time when I saved the custom field, it will set as default.

We use the field 'Incident time' to get a record of when the incident actually happend. A customer may call an hour or so, after the first occurance of the incident. Which is something Created field will not give justice.

 

Cheers,

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.
September 26, 2023

Oh, I see. The problem is that the default value is now hard coded vs. taking the current time at the time the incident is created. 

I would suggest that you don't set a default value for the field in the field configuration and instead automate setting the value to the current date/time if no value is selected by the person creating the incident.

Zaldy Parian
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 26, 2023

Yes correct. The behaviour of the field takes the date/time when the default value of the custom field was set/save.

I also considered automating it, but the problem with it is that effect is after saving the issue record. Same effect with workflow Post function method.

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.
September 27, 2023

Actually, I don't seem to be able to recreate quite the same problem in my Jira Software Free subscription.

I have a custom date/time field for which I set the default value to current date/time. In my profile timezone of America/Los Angeles it is currently 9/27/23 at 12:03 am. The time that is shown in the custom field is 7 hours behind, but if it was using UTC I would expect it to be 7 hours ahead.

Screenshot 2023-09-27 at 12.03.59 AM.png

 

If I wait a few minutes and then try to create an issue that includes that field. I see that the time is updated to reflect exactly 7 hours behind my current local time (which is now 9/27/23 12:10 am).

Screenshot 2023-09-27 at 12.10.42 AM.png

So, I don't seem to be getting a hard coded value coming through when I actually create the issue, but I'm also not getting either a date/time that matches my timezone setting or the correct date/time for UTC.

I'm going to raise this in a Slack channel where I communicate with other Atlassian users to see what other people observe.

Like Zaldy Parian likes this
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.
September 27, 2023

Hello @Zaldy Parian 

Other users (in the US) that I have talked to through Slack are seeing the same discrepancy I see. So far nobody has confirmed that they encounter the same problem you say you have - that the date added to the field during issue creation is hard coded as the date that showed in the Context for the field when you saved it.

I recommend that you open a case directly with Atlassian Support for additional guidance.

https://support.atlassian.com/contact/#/

It would be great if you report back here what you learn.

Zaldy Parian
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 27, 2023

Thanks @Trudy Claspill . I'll contact Atlassian Support.
Appreciate your help.

0 votes
Zaldy Parian
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 25, 2023

Btw, this is how it looks in the default setting....

current_date.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events