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

Build stats graph always shows dates in Jenkins timezone even when accessed from different timezone

      Let's say Jenkins server runs in PST timezone.

      When I access the build stats graph image via the URL (no authorization mode), the time display in X axis is always in PST. If I am accessing from India, I would expect that the time in X axis is in IST and might understand the graph wrongly.

      At least, if there is a way to choose the timezone, this would serve my purpose.

          [JENKINS-36999] Build stats graph always shows dates in Jenkins timezone even when accessed from different timezone

          Vivek Ganesan added a comment -

          I am willing to take and work on this.

          Vivek Ganesan added a comment - I am willing to take and work on this.

          Vivek Ganesan added a comment -

          Vivek Ganesan added a comment - Created PR  https://github.com/jenkinsci/global-build-stats-plugin/pull/11

          Hey Vivek!
          Im not sure about the behaviour of your request. I think i got the idea, but in this case isnt a global solution better for you? For example all data of the builds uses the time of the Jenkins (Build-Times, Logs etc...). So this way the global-build-stats-plugin would show different times than the actual builds on the jenkins. You sure you want that? 

          Nevertheless i get the idea that for the overview this function might get useful in some cases.
          About your request: I just took a quick look and i think i might found unwanted behaviour. Of course maybe im wrong, in which case I hope you can give me some wisdom .
          My concern: If you show an existing chart in India and pass the timeZone-parameter, the plugin will store that timeZone locally. That means, everyone else on the world looking at the plugin will load the timeZone you have set, because default no timeZone-parameter will be used. Then all would get the same X axis you got, unless they overwrite it themselves.
          On the one hand i think there should be the possibility that you see all charts by default in your timezone and so does everyone else. On the other hand this is also a problem if someone changes the timezone of one chart, while other charts have a different timezone. Youre also not able to see the timezone for each chart, which makes it hard to keep track which chart has which timezone.

           

          I hope my comment isnt too confusing

          regards

          David Krischke added a comment - Hey Vivek! Im not sure about the behaviour of your request. I think i got the idea, but in this case isnt a global solution better for you? For example all data of the builds uses the time of the Jenkins (Build-Times, Logs etc...). So this way the global-build-stats-plugin would show different times than the actual builds on the jenkins. You sure you want that?  Nevertheless i get the idea that for the overview this function might get useful in some cases. About your request: I just took a quick look and i think i might found unwanted behaviour. Of course maybe im wrong, in which case I hope you can give me some wisdom . My concern: If you show an existing chart in India and pass the timeZone-parameter, the plugin will store that timeZone locally. That means, everyone else on the world looking at the plugin will load the timeZone you have set, because default no timeZone-parameter will be used. Then all would get the same X axis you got, unless they overwrite it themselves. On the one hand i think there should be the possibility that you see all charts by default in your timezone and so does everyone else. On the other hand this is also a problem if someone changes the timezone of one chart, while other charts have a different timezone. Youre also not able to see the timezone for each chart, which makes it hard to keep track which chart has which timezone.   I hope my comment isnt too confusing regards

          Please reopen with proper solution/comment.

          All the best

          David Krischke added a comment - Please reopen with proper solution/comment. All the best

            dhinske David Krischke
            vivganes Vivek Ganesan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: