How to change the time zone in Jenkins?

See https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone. Jenkins should respect the timezone set for java. But you can force Jenkins to use a specific timezone by adding the following to start command of Jenkins:

java -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles

This should set your timezone to PST.


On Jenkins2 you can set the timezone at runtime via the Groovy Console. Just open "Manage Jenkins >> Script Console" and type

System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'America/Los_Angeles')

for example. Particularly helpful if you have no chance to change the startup variables but have admin rights on the instance. (often found in containerized setups). Only downside: Setting is gone on restart.