Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-40573

JIRA showing Russia/Moscow timezone as +4 instead of +3

      The current timezone in Moscow is GMT +3 hours, but JIRA still shows it as +4 Moscow.jpg. This is causing time displays to be off for users with their default timezones set to Moscow +4.

      Additionally, updating the JVM's timezone data using the tzupdater tool doesn't seem to help. It fixes the display issue where Moscow will now show +3, but all the dates and times displayed in JIRA are still ahead by 1 hour.

      Workaround
      ==========

      1. Change the timezone settings (profile or General Configuration) to use GMT OFFSET +03:00 OR
      2. Update joda-time in atlassian-jira/WEB-INF/lib to last version (2.5). Download the library from here. Next, update JAVA's timezone data using the tzupdater tool: http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html

        1. joda-time-2.3-20141027.jar
          577 kB
        2. Moscow.jpg
          Moscow.jpg
          189 kB

            [JRASERVER-40573] JIRA showing Russia/Moscow timezone as +4 instead of +3

            Also have some problem (with using timezone of user) with field duedate in table changeitem:

            FIELD OLDVALUE OLDSTRING NEWVALUE NEWSTRING
            duedate 2014-11-04 2014-11-04 23:00:00.0 2014-12-17 2014-12-17 23:00:00.0

            Andrey Mikuloff added a comment - Also have some problem (with using timezone of user) with field duedate in table changeitem: FIELD OLDVALUE OLDSTRING NEWVALUE NEWSTRING duedate 2014-11-04 2014-11-04 23:00:00.0 2014-12-17 2014-12-17 23:00:00.0

            I updated to joda-time-2.5 on JIRA 6.1.2 and patched Java with tzupdater, in interface all fine, but when i try to use data for reporting from database, table changeitem contains some wrong values in fields oldstring and newstring, for example:

            OLDVALUE OLDSTRING NEWVALUE NEWSTRING
            2014-12-05T13:47+0300 14:47 05.12.2014 2014-12-30T15:46+0300 16:46 30.12.2014

            Correct data in OLDVALUE and NEWVALUE, wrong data (with +1 hour) in OLDSTRING and NEWSTRING

            I try to search code for bug and found that JIRA create values and strings with

            VALUE: com.atlassian.jira.datetime.DateTimeFormatter.withStyle(DateTimeStyle.ISO_8601_DATE_TIME)
            STRING: com.atlassian.jira.datetime.DateTimeFormatter.forLoggedInUser().withStyle(DateTimeStyle.DATE_TIME_PICKER).format(new org.joda.time.DateTime(date, zone.get()), locale.get())
            

            I also found that user, created wrong values, have different timezone (GMT+4 instead GMT+3) - it is reason for this strange behavior, but I have a question: is it normal to write to database values, used by all users, with non standart (not setted as system) user timezone?

            Andrey Mikuloff added a comment - I updated to joda-time-2.5 on JIRA 6.1.2 and patched Java with tzupdater, in interface all fine, but when i try to use data for reporting from database, table changeitem contains some wrong values in fields oldstring and newstring, for example: OLDVALUE OLDSTRING NEWVALUE NEWSTRING 2014-12-05T13:47+0300 14:47 05.12.2014 2014-12-30T15:46+0300 16:46 30.12.2014 Correct data in OLDVALUE and NEWVALUE, wrong data (with +1 hour) in OLDSTRING and NEWSTRING I try to search code for bug and found that JIRA create values and strings with VALUE: com.atlassian.jira.datetime.DateTimeFormatter.withStyle(DateTimeStyle.ISO_8601_DATE_TIME) STRING: com.atlassian.jira.datetime.DateTimeFormatter.forLoggedInUser().withStyle(DateTimeStyle.DATE_TIME_PICKER).format( new org.joda.time.DateTime(date, zone.get()), locale.get()) I also found that user, created wrong values, have different timezone (GMT+4 instead GMT+3) - it is reason for this strange behavior, but I have a question: is it normal to write to database values, used by all users, with non standart (not setted as system) user timezone?

            Hello. I've tried solution from Denis on my test JIRA server and it works.

            Andrey Rusov added a comment - Hello. I've tried solution from Denis on my test JIRA server and it works.

            Thanks for the tips, Denis.

            Daniel Leng (Inactive) added a comment - Thanks for the tips, Denis.

            Denis Yaparov added a comment - - edited

            Just for the case - it is possible to build known-compatible version 2.3 of joda-time with fresh timezone info. IANA datasheet is also available to download.
            I've build and attached fresh jar to this defect. See joda-time-2.3-20141027.jar and this comment about it.

            Denis Yaparov added a comment - - edited Just for the case - it is possible to build known-compatible version 2.3 of joda-time with fresh timezone info. IANA datasheet is also available to download. I've build and attached fresh jar to this defect. See joda-time-2.3-20141027.jar and this comment about it.

            Answering my own question: Yes, joda 2.5 works on 5.2.11.

            Daniel Leng (Inactive) added a comment - Answering my own question: Yes, joda 2.5 works on 5.2.11.

            Hi ohernandez@atlassian.com is the latest joda-time JAR file compatible with older JIRA releases ? E.g. JIRA 5.2.11 ?

            Daniel Leng (Inactive) added a comment - Hi ohernandez@atlassian.com is the latest joda-time JAR file compatible with older JIRA releases ? E.g. JIRA 5.2.11 ?

            As suggested by lexey.genus, the fix here is to update JIRA's joda-time library to the latest to obtain the latest timezone data.

            Oswaldo Hernandez (Inactive) added a comment - As suggested by lexey.genus , the fix here is to update JIRA's joda-time library to the latest to obtain the latest timezone data.

            We've just updated joda-time in attlassian-jira/WEB-INF/lib to last version (2.5) and it works now. You can download joda-time from here

            Alexey Genus added a comment - We've just updated joda-time in attlassian-jira/WEB-INF/lib to last version (2.5) and it works now. You can download joda-time from here

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              dleng Daniel Leng (Inactive)
              Affected customers:
              18 This affects my team
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: