update jenkins timezone

There many ways to update jenkins timezone

Verify:

cat /etc/timezone
cat ls -ltr /etc/localtime
date

Centos/Redhat:

#update /etc/sysconfig/jenkins

#JENKINS_JAVA_OPTIONS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Calcutta"
#JENKINS_JAVA_OPTIONS="-Duser.timezone=Asia/Calcutta"

Debian/ubuntu :

#update /etc/default/jenkins

JAVA_ARGS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Calcutta"
JAVA_ARGS="-Duser.timezone=Asia/Calcutta"

Jenkins script console:


System.setProperty('user.timezone', 'Asia/Calcutta')
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'Asia/Calcutta')

Published by

Leave a Reply

Your email address will not be published. Required fields are marked *