Change time zone

Skip to end of metadata
Go to start of metadata

If your Jenkins instance is running in a different location than the user's (for example: the server is in NY but users are in LA), then the NY time zone will most probably be used, which may be quite annoying if you need to compare build dates.

To see the time zone used go to http://server/jenkins/systemInfo and see the user.timezone system property.

If you cannot change the time zone of your server, then you can force jelly to use a given time zone for formatting time stamps.

So, you need to start your servlet engine with the following java system property :

java -Dorg.apache.commons.jelly.tags.fmt.timeZone=TZ ...

where TZ is a java.util.TimeZone ID ("Europe/Paris" for example).

Note that

user.timezone=Europe/Paris

will work as well, but it can interfer with other contexts.

If running Jenkins via a system package, this can be accomplished by setting JAVA_ARGS in your /etc/default/jenkins (Debian)

JAVA_ARGS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York"

or /etc/sysconfig/jenkins (Red Hat) such as:

JENKINS_JAVA_OPTIONS="-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New_York"

and then restarting Jenkins via the init script (not via the UI).

On FreeBSD, the file to edit is /etc/rc.conf, and the option to use is:

    jenkins_java_opts="-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Indiana/Indianapolis"

On windows, edit %INSTALL_PATH%/jenkins/jenkins.xml. Note, put "-Dargs" before "-jar".

<arguments>-Xrs -Xmx256m -Duser.timezone="Europe/Minsk" -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment