Incorrect timestamps displayed in Jira server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

The times displayed in JIRA for issue creation, comments, etc. do not match the system time or what is expected on the machine running JIRA.

原因

The timezone used by JIRA is controlled by the Java Virtual Machine which uses the system time zone by default. If this is misconfigured, the times displayed in JIRA may not match the system time.

Further, dates and times are stored internally in JIRA's database and depend on the timezone of the database. For example, from PostgreSQL's documentation:

All timezone-aware dates and times are stored internally in UTC. They are converted to local time in the zone specified by the TimeZone configuration parameter before being displayed to the client.

Which can be demonstrated further:

jira6414=> select id, created from jiraissue;
  id   |          created           
-------+----------------------------
 10000 | 2016-09-06 18:41:53.983+00
 10001 | 2016-09-06 22:12:49.983+00
...
 10300 | 2016-09-15 17:06:25.544+00
 
jira6414=> SET TIME ZONE 'PST8PDT';
SET
jira6414=> select id, created from jiraissue;
  id   |          created           
-------+----------------------------
 10000 | 2016-09-06 11:41:53.983-07
 10001 | 2016-09-06 15:12:49.983-07
...
 10300 | 2016-09-15 10:06:25.544-07

MySQL's timezone can be configured as described further here

XML restore

When restoring an XML backup from another server, if the timezone changes this can alter all the times in the database. This is covered in further detail in  JRA-26039 - Getting issue details... STATUS .

SQL Server database

Times in Jira are stored as datetime. This type is not timezone aware. If you're importing data from Cloud to Server, you will have to set your JVM timezone to UTC prior to the import because all times in Cloud are in UTC. 

ソリューション

  • Modify the timezone, as per our Set the timezone for the Java environment KB article.
  • Ensure the desired timezone output is configured in JIRA's database
  • Verify the default timezone is not being changed at runtime by any plugins installed in JIRA. This will cause significant problems.

最終更新日 2019 年 9 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.