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

timestamper shows wrong time on [View as plain text] link

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • timestamper-plugin
    • None
    • Jenkins 2.332.3
      Timestamper 1.17

      The plugin shows correct timestamp when looking at the Console Output:

      10:02:52  Started by user admin
      10:02:52  [Pipeline] Start of Pipeline
      10:02:53  [Pipeline] node
      10:02:53  Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
      10:02:53  [Pipeline] {
      10:02:53  [Pipeline] stage
      10:02:53  [Pipeline]

      { (Hello) 10:02:53  [Pipeline] echo 10:02:53  Hello World 10:02:53  [Pipeline] }

      10:02:53  [Pipeline] // stage
      10:02:53  [Pipeline] }
      10:02:53  [Pipeline] // node
      10:02:53  [Pipeline] End of Pipeline
      10:02:53  Finished: SUCCESS

      But when looking at the same build instance using [View as plain text] the timestamp is wrong:

      [2022-06-14T17:02:52.557Z] Started by user admin
      [2022-06-14T17:02:52.739Z] [Pipeline] Start of Pipeline
      [2022-06-14T17:02:53.245Z] [Pipeline] node
      [2022-06-14T17:02:53.267Z] Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
      [2022-06-14T17:02:53.310Z] [Pipeline] {
      [2022-06-14T17:02:53.367Z] [Pipeline] stage
      [2022-06-14T17:02:53.375Z] [Pipeline]

      { (Hello) [2022-06-14T17:02:53.477Z] [Pipeline] echo [2022-06-14T17:02:53.484Z] Hello World [2022-06-14T17:02:53.490Z] [Pipeline] }

      [2022-06-14T17:02:53.554Z] [Pipeline] // stage
      [2022-06-14T17:02:53.570Z] [Pipeline] }
      [2022-06-14T17:02:53.690Z] [Pipeline] // node
      [2022-06-14T17:02:53.726Z] [Pipeline] End of Pipeline
      [2022-06-14T17:02:53.806Z] Finished: SUCCESS

      How can this be fixed ?

      Pipeline script is:

      pipeline {
          agent any

          stages {
              stage('Hello') {
                  steps {
                      echo 'Hello World'
                  }
              }
          }
      }

          [JENKINS-68760] timestamper shows wrong time on [View as plain text] link

          Rich created issue -
          Rich made changes -
          Description Original: The plugin shows correct timestamp when looking at the Console Output:

          10:02:52  Started by user admin
          10:02:52  [Pipeline] Start of Pipeline
          10:02:53  [Pipeline] node
          10:02:53  Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
          10:02:53  [Pipeline] {
          10:02:53  [Pipeline] stage
          10:02:53  [Pipeline] { (Hello)
          10:02:53  [Pipeline] echo
          10:02:53  Hello World
          10:02:53  [Pipeline] }
          10:02:53  [Pipeline] // stage
          10:02:53  [Pipeline] }
          10:02:53  [Pipeline] // node
          10:02:53  [Pipeline] End of Pipeline
          10:02:53  Finished: SUCCESS

          But when looking at the same build instance using [View as plain text] the timestamp is wrong:

          [2022-06-14T17:02:52.557Z] Started by user admin
          [2022-06-14T17:02:52.739Z] [Pipeline] Start of Pipeline
          [2022-06-14T17:02:53.245Z] [Pipeline] node
          [2022-06-14T17:02:53.267Z] Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
          [2022-06-14T17:02:53.310Z] [Pipeline] {
          [2022-06-14T17:02:53.367Z] [Pipeline] stage
          [2022-06-14T17:02:53.375Z] [Pipeline] { (Hello)
          [2022-06-14T17:02:53.477Z] [Pipeline] echo
          [2022-06-14T17:02:53.484Z] Hello World
          [2022-06-14T17:02:53.490Z] [Pipeline] }
          [2022-06-14T17:02:53.554Z] [Pipeline] // stage
          [2022-06-14T17:02:53.570Z] [Pipeline] }
          [2022-06-14T17:02:53.690Z] [Pipeline] // node
          [2022-06-14T17:02:53.726Z] [Pipeline] End of Pipeline
          [2022-06-14T17:02:53.806Z] Finished: SUCCESS

          How can this be fixed ?
          New: The plugin shows correct timestamp when looking at the Console Output:

          10:02:52  Started by user admin
          10:02:52  [Pipeline] Start of Pipeline
          10:02:53  [Pipeline] node
          10:02:53  Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
          10:02:53  [Pipeline] {
          10:02:53  [Pipeline] stage
          10:02:53  [Pipeline]

          { (Hello) 10:02:53  [Pipeline] echo 10:02:53  Hello World 10:02:53  [Pipeline] }

          10:02:53  [Pipeline] // stage
          10:02:53  [Pipeline] }
          10:02:53  [Pipeline] // node
          10:02:53  [Pipeline] End of Pipeline
          10:02:53  Finished: SUCCESS

          But when looking at the same build instance using [View as plain text] the timestamp is wrong:

          [2022-06-14T17:02:52.557Z] Started by user admin
          [2022-06-14T17:02:52.739Z] [Pipeline] Start of Pipeline
          [2022-06-14T17:02:53.245Z] [Pipeline] node
          [2022-06-14T17:02:53.267Z] Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\test-timestamp
          [2022-06-14T17:02:53.310Z] [Pipeline] {
          [2022-06-14T17:02:53.367Z] [Pipeline] stage
          [2022-06-14T17:02:53.375Z] [Pipeline]

          { (Hello) [2022-06-14T17:02:53.477Z] [Pipeline] echo [2022-06-14T17:02:53.484Z] Hello World [2022-06-14T17:02:53.490Z] [Pipeline] }

          [2022-06-14T17:02:53.554Z] [Pipeline] // stage
          [2022-06-14T17:02:53.570Z] [Pipeline] }
          [2022-06-14T17:02:53.690Z] [Pipeline] // node
          [2022-06-14T17:02:53.726Z] [Pipeline] End of Pipeline
          [2022-06-14T17:02:53.806Z] Finished: SUCCESS

          How can this be fixed ?

          Pipeline script is:

          _pipeline {_
              _agent any_

              _stages {_
                  _stage('Hello') {_
                      _steps {_
                          _echo 'Hello World'_
                      _}_
                  _}_
              _}_
          _}_
          Rich made changes -
          Attachment New: screenshot-1.png [ 58198 ]
          Rich made changes -
          Attachment New: view as plain text.png [ 58199 ]
          ieren made changes -
          Rank New: Ranked higher
          ieren made changes -
          Rank New: Ranked higher
          ieren made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          ieren made changes -
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]
          Ivan Fernandez Calvo made changes -
          Priority Original: Blocker [ 1 ] New: Major [ 3 ]

            Unassigned Unassigned
            richmond Rich
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: