jenkinsci / build-timeout-plugin

Jenkins build-timeout plugin
https://plugins.jenkins.io/build-timeout/
31 stars 80 forks source link

Support timezone overriding #66

Open yuha0 opened 6 years ago

yuha0 commented 6 years ago

My Jenkins instance is running in America/New_York timezone and it contains one job that needs to be run in Asia/Shanghai.

The timeout plugin only allows me to enter time in Deadline strategy and it assumes the time is in Jenkins system timezone. In order to abort its builds at a certain time, I need to change the time twice every year because of the daylight saving switches in New York (since Shanghai does not observe daylight saving at all). Can we make timezone configurable in Deadline strategy so that I don't need to remember to manually change this?

Apologies in advance if this is not a proper place for feature requests. I see the Issues tab is open here so didn't think twice. I don't have an Jenkins Jira account.

krisstern commented 2 years ago

@yuha0 Thanks for the issue!

I somehow feel the timezone should be set a the Jenkins system-wide level instead, as prescribed at: https://www.jenkins.io/doc/book/managing/change-system-timezone/

Unless you mean you would want to observe two separate timezones, one for core Jenkins, and the other for the Deadline Strategy. But that could be overly complicating things, IMO at least.

yuha0 commented 2 years ago

Hi @krisstern

Yes, I meant observing multiple timezones in a single Jenkins instance.

Jenkins built-in cron job trigger supports timezones, So it was kinda weird that "I am allowed to specify a time in any timezone to start a build, but I can only use jenkins system timezone to terminate it".

But I agree, implementing timezone support can be very complicated.

krisstern commented 2 years ago

Thanks, I see! So it is a consistency issue. I did do some research into this and found that the implementation is indeed possible.

This could be a good feature to add. @yuha0 I will keep you posted regarding its development.