• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Jenkins ver. 2.204.1
    • Jenkins 2.240

      It appears there is an issue with Jenkins displaying time. I have suffered from two issues of which the second is more problematic.

      When I started using Jenkins at $NEW_COMPANY I had configured my timezone to be Europe/Brussels (CEST). And while Jenkins reported time as CEST, the actual time shown was UTC.

      The below job was started at 11:36 CEST !

      I assumed there was a timezone/time misconfiguration on the Jenkins server itself. After reporting we started to play around with the settings. I believed when changing my user timezone to Etc/UTC I would see a reported time with 2 hours behind. But lo and behold, the UTC time was the same (and correctly so) reported as UTC.

      So no problem for people living in a UTC timezone. However when going back to timezone Europe/Brussels, now the behavior was different:

      On initial refresh of the page all times were correct displaying the correct timezone. However a second later the time is updated using UTC time and CEST reported as timezone.

      So I experienced 2 problems, of which the second is worse as there appears no corrective action.

      • After initially setting up the correct timezone, all reported times where UTC while reporting the (user configured) CEST timezone (so 2 hours behind real time)
      • When switching to UTC and back to CEST, only the running jobs are showing UTC time with a report CEST timezone

          [JENKINS-61972] Time is wrongly displayed on running Jobs

          Jesse Glick added a comment -

          danielbeck says this is due to JENKINS-19887.

          Jesse Glick added a comment - danielbeck says this is due to JENKINS-19887 .

          Nathan Grubb added a comment -

          dag Can you confirm that if you disable your user time zone setting if everything works as expected? I think when I initially developed this feature I was testing with Jenkins using UTC time but in hindsight that wasn't a very good idea as that's the easiest case. I will look into improving this feature.

          Nathan Grubb added a comment - dag  Can you confirm that if you disable your user time zone setting if everything works as expected? I think when I initially developed this feature I was testing with Jenkins using UTC time but in hindsight that wasn't a very good idea as that's the easiest case. I will look into improving this feature.

          Dag Wieers added a comment -

          I already confirmed this in my examples.

          Dag Wieers added a comment - I already confirmed this in my examples.

          Nathan Grubb added a comment -

          Looked into this and figured out what was happening. I have a fix, but I need some help on it. Will create a PR.

          Nathan Grubb added a comment - Looked into this and figured out what was happening. I have a fix, but I need some help on it. Will create a PR.

          Nathan Grubb added a comment -

          PR is up: https://github.com/jenkinsci/jenkins/pull/4760/files

          Actually change might not be as bad as I thought it was as I see other references to variables not defined explicitly in the jelly file so perhaps that's normal (though not entirely sure). Initially I was just overriding the time zone in entry.jelly, but then I realized I wanted to override it on the top most level I could find which was layout.jelly but I didn't retest after that. The problem that happens in on the AJAX calls for the delta on buildHistory since the page was initially loaded, the history widget (HistoryWidget.java) doesn't render the whole page and thus doesn't render layout.jelly. Instead it just renders ajaxBuildHistory.jelly which contains entries.jelly and finally entry.jelly. 

          Nathan Grubb added a comment - PR is up: https://github.com/jenkinsci/jenkins/pull/4760/files Actually change might not be as bad as I thought it was as I see other references to variables not defined explicitly in the jelly file so perhaps that's normal (though not entirely sure). Initially I was just overriding the time zone in entry.jelly, but then I realized I wanted to override it on the top most level I could find which was layout.jelly but I didn't retest after that. The problem that happens in on the AJAX calls for the delta on buildHistory since the page was initially loaded, the history widget (HistoryWidget.java) doesn't render the whole page and thus doesn't render layout.jelly. Instead it just renders ajaxBuildHistory.jelly which contains entries.jelly and finally entry.jelly. 

          Nathan Grubb added a comment -

          Also to anyone that is a GitHub Owner on jenkinsci, could they add the "Quick Links" feature where you can just type JENKINS-XXXXX and it'll automatically make it a link to this Jira project? oleg_nenashev maybe?

          Nathan Grubb added a comment - Also to anyone that is a GitHub Owner on jenkinsci, could they add the "Quick Links" feature where you can just type JENKINS-XXXXX and it'll automatically make it a link to this Jira project? oleg_nenashev maybe?

          Daniel Beck added a comment - - edited

          Autolinks are available in repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

          Doesn't seem worth the almost 100k USD it would cost per year.

          Daniel Beck added a comment - - edited Autolinks are available in repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. Doesn't seem worth the almost 100k USD it would cost per year.

          Oleg Nenashev added a comment -

          +1 to what danielbeck says. 

          Oleg Nenashev added a comment - +1 to what danielbeck  says. 

          Nathan Grubb added a comment -

          Makes sense, wasn't aware fo this. Agreed definitely not worth 100k per year. 

          Nathan Grubb added a comment - Makes sense, wasn't aware fo this. Agreed definitely not worth 100k per year. 

          Nathan Grubb added a comment -

          Assigning to dag to close. 

          Nathan Grubb added a comment - Assigning to dag to close. 

            dag Dag Wieers
            dag Dag Wieers
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: