How to make Jenkins CI use Local time instead of UTC on debian squeeze

Jenkinstimetimezone

I have a Jenkins-ci installation on a debian squeeze.

Current default time zone: 'America/Toronto'
Local time is now:      Mon Jul  9 16:00:57 EDT 2012.
Universal Time is now:  Mon Jul  9 20:00:57 UTC 2012.

In the /etc/default/rcS file i have :

UTC=no

Unfortunately this is not working, In the system information of jenkins:

user.timezone   Etc/UTC

I searched for a few hour.. unfortunately could not find a fix any help would be greatly appreciated.

Thank for your time

Best Answer

You need to pass in your required value of user.timezone as a JVM argument when you start Jenkins. The Java command line will look something like:

$JAVA_HOME/java -Duser.timezone="America/Toronto" [other JVM parameters] $JENKINS_HOME/jenkins.jar

Unfortunately I'm not familiar with the Debian installation, but the JVM parameters should either be defined in the /etc/init.d/jenkins script or in a properties file that is referenced from that script.