Incorrect timestamps displayed in Jira server when using Africa/Casablanca timezone

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

The datepicker fields and some timestamps in the issue view (e.g "Created", "Updated" and "Time of comment") are not displaying the correct timezone offset when the timezone is set to Africa/Casablanca (GMT + 0100). The time is correct but the timezone is pointing to GMT instead of GMT+0100.

注意

This is different from the issue where the timezone is showing the wrong offset in the settings (e.g if the timezone is showing Africa/Casablance GMT + 0000 instead of Africa/Casablance GMT + 0100).


重要

The workaround suggested in this article requires to downgrade to an old version of the Timezone Data Version used by the JRE. This will fix the issue for Africa/Casablanca but might cause issues for other time zones. Therefore, it should be carefully tested before making any change in production.


環境

8.5.3

診断


  • Under Administration > System > System Info, make sure the System timezone is set up correctly. If this needs to be updated, you may follow the steps indicated in Set the timezone for the Java environment.
  • Check the timezone setting in user preferences under Profile > Preferences > Time Zone.
  • Make sure you are not changing the timezone in the Date/Time Formats section under Administration > System > Look and feel. There is a known BUG in  JRASERVER-35027 - Getting issue details... STATUS  for that.
  • Make sure you are using the latest joda-time version. You may refer to 

    Adjusting daylight saving time - Brazil, 2019.

  • Check the tzdata version used by your system and see if it's mapping to the right offset for the timezone/period in question:
    1. To check the version
      1. We need to verify some information on the Java that Jira is using:
        1. On your Jira, go to Jira administration (gear icon) > System > System info
        2. Check the values from the Java Vendor, and the java.home variables.
      2. Download tzupdater.zip and extract the file., then run this command. It should return the version currently used in your JRE:
      sudo <java.home>/bin/java -jar tzupdater.jar -V
      tzupdater version 2.3.2-b02
      JRE tzdata version: tzdata2021a
    2. Download the tar.gz used by your JRE (in this case tzdata2021a), unpack it, and check the rules for your timezone and the year/period in question:

      wget https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz
      tar -xvf tzdata2021a.tar.gz

      In the Africa file, you should see something similar to the following:

      # Rule  NAME    FROM    TO      -       IN      ON      AT      SAVE    LETTER/S
      Rule    Morocco 2020    only    -       May     31       2:00   0       -
      Rule    Morocco 2021    only    -       Apr     11       3:00   -1:00   -
      Rule    Morocco 2021    only    -       May     16       2:00   0       -
      Rule    Morocco 2022    only    -       Mar     27       3:00   -1:00   -

      For instance, this indicates that between Apr 11 at 3:00 AM and May 16 at 2:00 AM, the system will consider Africa/Casablance as GMT + 0100 for the year 2021. However, before and after that, the timezone is set to GMT + 0000.


原因


The Timezone Data Version (tzdataxxxx.tar.gz) used by your JRE is using the wrong offset for that timezone.

Please note that the offsets in tzdataxxxx.tar.gz are defined by seasons so the behavior might change based on the season.


ソリューション

For some customers, this was fixed by downgrading to an older Timezone data version (tzdata2018g.tar.gz):

  1. Jira を停止します。
  2. Download tzupdater.zip and extract the file. 
  3. Run the tzupdater to update to the version tzdata2018g.tar.gz:
    1. If your Java Vendor is "Oracle Corporation" run the following command using the java.home parameter from before:

      sudo <java_home>/bin/java -jar <path_to_tzupdater>/tzupdater.jar --force -l https://data.iana.org/time-zones/releases/tzdata2018g.tar.g
    2. If your Java Vendor is different from "Oracle Corporation", run the alternative command using the java.home parameter from before:

      sudo <java_home>/bin/java -Djava.vendor="Oracle Corporation" -jar <path_to_tzupdater>/tzupdater.jar --force -l https://data.iana.org/time-zones/releases/tzdata2018g.tar.g


  4. Confirm that the version was updated correctly:

    sudo <java.home>/bin/java -jar tzupdater.jar -V
    tzupdater version 2.3.2-b02
    JRE tzdata version: tzdata2018g
    tzupdater tool would update with tzdata version: tzdata2021a
  5. Jira を起動します。



最終更新日 2021 年 6 月 14 日

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

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