Date Time custom field doesn't calculate current time

XMLWordPrintable

    • 4.04

      The Date Time custom field no longer reporting the current time. It looks as if the time is reporting in UTC +8.

      The field was working correctly in JIRA 4.3.4. Does not work in JIRA versions 4.4+

      Workaround:

      There is a workaround found by lucgauf:
      Modify the file Calendar-min.js located in /includes/lib/calendar/
      This file looks like there is no line break so I can't give the line but you have to include this code between :

      Calendar-min.js
      ...
      this.isPopup=false
      }
      // start code to add
      if (this.dateStr) {
             var dateStrCustom = ""+this.dateStr;
             dateStrCustom = dateStrCustom.replace(/-/g,"/").replace(/(\d\d)+T+(\d\d)/, "$1 $2");
              this.date=new Date(dateStrCustom);
      }
      
      if (!this.date || isNaN(this.date)) {
              this.date=new Date();
      }
      // end code to add
      
      var table=Calendar.createElement("table");
      ...
      

      It works with IE9 and FF8, our JIRA version is 4.4.3.

      Important: This workaround consists of modifying the bundled JIRA code, and hence, Atlassian does not provide support to it. We recommend to upgrade your JIRA to a version which contains the fix to resolve this issue permanently.

        1. Screen shot 2011-11-15 at 9.31.16 AM.png
          141 kB
          Ivan Tse
        2. jabad_gmt-10.jpg
          66 kB
          Jon Abad
        3. date-time-custom-field-issue.png
          113 kB
          Anthony Fok

            Assignee:
            Oswaldo Hernandez (Inactive)
            Reporter:
            Ivan Tse
            Votes:
            7 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: