[JIRA] [core] (JENKINS-9283) Add timezone to cron expression

129 views
Skip to first unread message

scm_issue_link@java.net (JIRA)

unread,
May 21, 2015, 1:49:02 AM5/21/15
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on New Feature JENKINS-9283
 
Re: Add timezone to cron expression

Code changed in jenkins
User: Boris
Path:
core/src/main/java/hudson/scheduler/CronTab.java
core/src/main/java/hudson/scheduler/CronTabList.java
core/src/test/java/hudson/scheduler/CronTabTest.java
http://jenkins-ci.org/commit/jenkins/6b4d044ae065c5abf515c48b37a990015ee1be24
Log:
JENKINS-9283 - Allow timezone definition in scheduler

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

scm_issue_link@java.net (JIRA)

unread,
May 21, 2015, 1:49:03 AM5/21/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Oleg Nenashev
Path:
core/src/main/java/hudson/scheduler/CronTab.java
core/src/main/java/hudson/scheduler/CronTabList.java
core/src/test/java/hudson/scheduler/CronTabTest.java
http://jenkins-ci.org/commit/jenkins/73e151f3d1582b90a68e2f8c0e8bec0fbc042ee3
Log:
Merge pull request #1672 from productsupcom/JENKINS-9283

JENKINS-9283 Timezone Support for Scheduling

Compare: https://github.com/jenkinsci/jenkins/compare/5540e93f4a10...73e151f3d158

clint_brown@mailinator.com (JIRA)

unread,
Aug 3, 2015, 12:45:03 PM8/3/15
to jenkinsc...@googlegroups.com

Thanks. This works for the scheduling, but if you kick off a shell script that uses the date command, it still assumes the host/slaves timezone and returns the wrong value. You can set an export variable before launching the script: export TZ=/usr/share/zoneinfo/Europe/London which will do the right thing, but now has to be managed in multiple places. Perhaps adding a dropdown with zones to the config that you can select makes more sense. Then the cron trigger and shell build task can interrogate and do the right thing if set.

dbeck@cloudbees.com (JIRA)

unread,
Aug 3, 2015, 7:15:03 PM8/3/15
to jenkinsc...@googlegroups.com

IMO this looks like a really limited use case working around infra snafus (not to mention you didn't bring this up in the additional request). Additionally, I doubt any such magic would be expected by the majority of users as execution of any commands is entirely independent of scheduling in Jenkins, not to mention inconsistencies between various build steps (nothing but shell build step would support setting TZ this way).

clint_brown@mailinator.com (JIRA)

unread,
Aug 4, 2015, 2:07:02 PM8/4/15
to jenkinsc...@googlegroups.com

I didn't bring it up initially cause I didn't realize it was an issue until I actually tried it....

dbeck@cloudbees.com (JIRA)

unread,
Apr 25, 2016, 9:06:02 AM4/25/16
to jenkinsc...@googlegroups.com
Daniel Beck resolved as Fixed
 

This issue has been resolved a while ago.

Features such as the one described in a recent comment should be filed independently.

Jenkins / New Feature JENKINS-9283
Change By: Daniel Beck
Status: Open Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages