I wish to change the time zone of the Jenkins.
I have changed the time zone of the Jenkins installed server, but the Jenkins UI shows the different time.
I need to set the PST time for Jenkins UI. How can I do it?
To see the time zone currently set, go to jenkins_server/systemInfo and see the user. timezone system property. You may want to change the time zone displayed to match your own time zone. By going to your user configuration page, you can set the User Defined Time Zone to match your own.
You can explicitly set a default time zone on the command line by using the Java system property called user. timezone . This bypasses the settings in the Windows operating system and can be a workaround.
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.
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.
Login to jenkins and goto right top end and click on the user
then click on the configure and scroll down to last option "User Defined Time Zone" here you can find the different timezones.
I am using jenkins version 2.222.3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With