Change System Time Zone

The system time zone configuration is the default time zone displayed by Jenkins. The "Manage Jenkins" ⇒ "System Information" page shows the value of the system properties that define the time zone for the Jenkins controller.

User Defined Time Zone

A user defined time zone for the account can be set from the configure option in the user settings.

Configure option in the dropdown
Changing user defined timezone setting

System Time Zone properties

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

You need to start your Jenkins 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 interfere with other contexts.

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

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

or /etc/sysconfig/jenkins (Red Hat, CentOS, Amazon Linux, Oracle Linux):

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

or, if that doesn’t work:

JENKINS_JAVA_OPTIONS="-Duser.timezone=America/New_York"

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/Denver"

On windows, edit %INSTALL_PATH%/jenkins/jenkins.xml. Put -Dargs before -jar:

<arguments>-Duser.timezone="Europe/Minsk" -jar "%BASE%\jenkins.war"</arguments>

You can also set it from the Jenkins Script Console on a live system without the need for a restart. This can also be included in a Post-initialization script to make it permanent.

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


Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.