-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-9283] Timezone Support for Scheduling #1672
Conversation
@@ -71,6 +75,16 @@ public String checkSanity() { | |||
return null; | |||
} | |||
|
|||
public static String getValidTimezone(String timezone) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CheckForNull
is a must in such methods. Javadoc would be also useful
LGTM |
@0bp please squash commits into a single one. After that I'll be able to merge the change |
@oleg-nenashev Done, thanks! |
[JENKINS-9283] Timezone Support for Scheduling
Merged, thanks! |
It looks like documentation for this is missing, and JIRA hasn't been updated. |
@orrc |
} | ||
} | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it's not a big deal, but I'd note that this check rules out using valid Java TimeZone values like GMT-8
as the TZ
value.
@orrc
Would it work for you? |
Yeah, thanks. I realised my mistake and posted the same comment at the same time as you :)
Sounds good. I think clear documentation is important for this — I just found this feature via the 1.615 changelog and wondered how it worked. I think form validation is also really important here, as it's easy to mistype a timezone ID, and then there's no way to find out that you made a mistake, without configuring a logger on |
@orrc |
This will allow to define a timezone in the scheduling text input field like in some cron implementations. If there's for example TZ=Australia/Sydney defined in the first line, each cron definition in that field will trigger the job based on that timezone. The timezone defined in the job does not affect the date/times for the execution history. Those times are still in the systems timezone.
Supported timezones are those from TimeZone.getAvailableIDs()