Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-10184

wrong timestamps in build timeline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: other
    • Labels:
      None
    • Environment:
      German Translation
      Windows Server 2008 R2 Standard
      Tomcat 7.0.16
      Time Zone UTC+1
    • Similar Issues:

      Description

      The timestamps shown in the build timeline differ from the actual time of the builds by -1 hour. The machine is based in time zone utc+1. See the attached screenshot for further information.

        Attachments

          Issue Links

            Activity

            Hide
            evernat evernat added a comment -

            I also reproduce the issue with Jenkins 1.440.
            In /systeminfo, I have user.timezone = Europe/Paris (UTC+1).
            In the build history, there is a build at "14:36:22" (in June) but in the timeline, the same build is displayed at "13:36:22" as shown in the tooltip (BAD).
            And also, in the build history, there is another build at "15:21:25" (in January) and in the timeline, the same build is displayed at "15:21:25" as shown in the tooltip (GOOD).
            So it seems to be an issue of daylight saving time, and in the same timeline some builds are bad and others are good.

            In [1], I see that java.util.TimeZone.getDefault().getRawOffset() is used.
            Perhaps, java.util.TimeZone.getDefault().getOffset(date.getTime()) should be used instead for each date, or the timezone of the dates could be changed on the server before sending the JSON of the timeline data to the client.

            [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly#L42

            Show
            evernat evernat added a comment - I also reproduce the issue with Jenkins 1.440. In /systeminfo, I have user.timezone = Europe/Paris (UTC+1). In the build history, there is a build at "14:36:22" (in June) but in the timeline, the same build is displayed at "13:36:22" as shown in the tooltip (BAD). And also, in the build history, there is another build at "15:21:25" (in January) and in the timeline, the same build is displayed at "15:21:25" as shown in the tooltip (GOOD). So it seems to be an issue of daylight saving time, and in the same timeline some builds are bad and others are good. In [1] , I see that java.util.TimeZone.getDefault().getRawOffset() is used. Perhaps, java.util.TimeZone.getDefault().getOffset(date.getTime()) should be used instead for each date, or the timezone of the dates could be changed on the server before sending the JSON of the timeline data to the client. [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly#L42
            Hide
            damienfinck67 Damien Finck added a comment -

            Hello,

            I have the same problem !
            I have -1 hour of difference.

            System :
            Jenkins : 1.480
            user.timezone : Europe/Paris

            Show
            damienfinck67 Damien Finck added a comment - Hello, I have the same problem ! I have -1 hour of difference. System : Jenkins : 1.480 user.timezone : Europe/Paris
            Hide
            damienfinck67 Damien Finck added a comment -

            It's fixed for me for months.

            System : Windows 288 r2
            Jenkins 1.507
            user.timezone : Europe/Paris

            Show
            damienfinck67 Damien Finck added a comment - It's fixed for me for months. System : Windows 288 r2 Jenkins 1.507 user.timezone : Europe/Paris
            Hide
            evernat evernat added a comment -

            This seems not fixed to me, in summer time.
            Reproduced with Jenkins 1.510 (local) and 1.480.3 (cloudbees).
            (Windows XP, Firefox 20, Europe/Paris)

            Reproduced for example, on https://javamelody.ci.cloudbees.com/job/javamelody/buildTimeTrend
            I have attached a screenshot with cloudbees for April 13

            Show
            evernat evernat added a comment - This seems not fixed to me, in summer time. Reproduced with Jenkins 1.510 (local) and 1.480.3 (cloudbees). (Windows XP, Firefox 20, Europe/Paris) Reproduced for example, on https://javamelody.ci.cloudbees.com/job/javamelody/buildTimeTrend I have attached a screenshot with cloudbees for April 13
            Hide
            damienfinck67 Damien Finck added a comment -

            oh...indeed it isn't fixed for me.
            In winter time, all is good, but in summer time I have this bug too.

            System : Windows 288 r2
            Jenkins 1.510
            user.timezone : Europe/Paris

            Show
            damienfinck67 Damien Finck added a comment - oh...indeed it isn't fixed for me. In winter time, all is good, but in summer time I have this bug too. System : Windows 288 r2 Jenkins 1.510 user.timezone : Europe/Paris
            Hide
            cjw296 Chris Withers added a comment -

            I'm seeing the same:

            System: Linux - SLES11SP1
            Jenkins 1.480.3
            user.timezone America/New_York

            Show
            cjw296 Chris Withers added a comment - I'm seeing the same: System: Linux - SLES11SP1 Jenkins 1.480.3 user.timezone America/New_York
            Hide
            fredg Fred G added a comment -
            Show
            fredg Fred G added a comment - Opened a pull request: https://github.com/jenkinsci/jenkins/pull/813
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Fred G
            Path:
            core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
            http://jenkins-ci.org/commit/jenkins/f6ac62bfba80093b9cf3957b5055fcce2a15002a
            Log:
            [FIXED JENKINS-10184] wrong timestamps in build timeline - added
            Daylight Saving Time

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Fred G Path: core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly http://jenkins-ci.org/commit/jenkins/f6ac62bfba80093b9cf3957b5055fcce2a15002a Log: [FIXED JENKINS-10184] wrong timestamps in build timeline - added Daylight Saving Time
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
            http://jenkins-ci.org/commit/jenkins/331809087800ae51843262691b67fc59cd9eba00
            Log:
            Merge pull request #813 from fredg02/JENKINS-10184

            [FIXED JENKINS-10184] wrong timestamps in build timeline.

            I'm going to just merge this in for now and welcome anyone who finds the proper way to do this.

            Compare: https://github.com/jenkinsci/jenkins/compare/d0a9fb775487...331809087800

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly http://jenkins-ci.org/commit/jenkins/331809087800ae51843262691b67fc59cd9eba00 Log: Merge pull request #813 from fredg02/ JENKINS-10184 [FIXED JENKINS-10184] wrong timestamps in build timeline. I'm going to just merge this in for now and welcome anyone who finds the proper way to do this. Compare: https://github.com/jenkinsci/jenkins/compare/d0a9fb775487...331809087800
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2720
            [FIXED JENKINS-10184] wrong timestamps in build timeline - added (Revision f6ac62bfba80093b9cf3957b5055fcce2a15002a)

            Result = UNSTABLE
            Fred G : f6ac62bfba80093b9cf3957b5055fcce2a15002a
            Files :

            • core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2720 [FIXED JENKINS-10184] wrong timestamps in build timeline - added (Revision f6ac62bfba80093b9cf3957b5055fcce2a15002a) Result = UNSTABLE Fred G : f6ac62bfba80093b9cf3957b5055fcce2a15002a Files : core/src/main/resources/hudson/model/BuildTimelineWidget/control.jelly

              People

              Assignee:
              fredg Fred G
              Reporter:
              michaelk Michael Kuger
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: