jenkinsci / plasticscm-plugin

A plugin for Jenkins to be able to use Plastic SCM
MIT License
16 stars 31 forks source link

Polling not working when jenkins and plastic server are set to different time zones. #72

Closed amgtf closed 6 months ago

amgtf commented 7 months ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.414.3 OS: Linux - 5.15.133.1-microsoft-standard-WSL2 Java: 17.0.8.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- plasticscm-plugin:4.5-SNAPSHOT (private-6f0f2d67-amoberg) ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins: 2.414.3 OS: Linux - 5.15.133.1-microsoft-standard-WSL2 Java: 17.0.8.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

Reproduction steps

  1. Have the Plastic server running in UTC+1
  2. Have the Jenkins server running in UTC
  3. Set up a job in Jenkins that polls the plastic server for changes.
  4. Check in a change in plastic

Expected Results

The change should trigger a build right away

Actual Results

It takes an hour for the build to start.

Anything else?

In the logs we can see that it runs this command, which is the Jenkins server's local time. Without timezone info the plastic server sees it at its local time.

cm find changeset where date between '2024-01-09T10:04:20' and '2024-01-09T10:13:00' ...

Are you interested in contributing a fix?

I've already sent a pull request months ago that hasn't been picked up, not sure if it was missed or if I missed to add something to it.

mig42 commented 7 months ago

Thanks for the report and the PR @amgtf ! We'll process it as soon as we can.