1. 当前登陆生效:
jenkins -> 系统管理 -> 脚本命令行:System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'Asia/Shanghai')
2. 日程表里这样写
TZ=Asia/Shanghai 0 10 * * 1-5
3. 进入容器修改/etc/timezone,永久生效
sudo docker exec -it -u root jenkins bash cat /etc/timezone //Etc/UTC echo 'Asia/Shanghai' > /etc/timezone cat /etc/timezone //Asia/Shanghai exit sudo docker restart jenkins
参考: