How to change the time zone in Jenkins?

I want to change the time zone of Jenkins.

I changed the time zone of the installed Jenkins server, but the Jenkins user interface shows a different time.

I need to set the PST time for the Jenkins user interface. How should I do it?

+19
source share
6 answers

See https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone . Jenkins must respect the time zone set for Java. But you can force Jenkins to use a specific time zone by adding the following to run the Jenkins command:

java -Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Los_Angeles

This should set your time zone to PST.

+10

Jenkins2 Groovy. " Jenkins β†’ Script "

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

. , , . ( ). : .

+42

5n

Jenkins2 Groovy Console. " Jenkins >> Script Console"

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

+3

, issue .

OPEN, Unresolved, , , Console Output Jenkins (2.60.2) >> <jobName> >> <build#>:

Use browser time zone

+2

:

bitnami ( UTC), AWS ( us-east-2). , , , , , . /etc/timezone /etc/localtime Australia/Sydney Jenkins.

0

I am using Ubuntu version 16.04 and Jenkins Jenkins ver version. 2.164.3 I tried to use java -Dorg.apache.commons.jelly.tags.fmt.timeZone = America / Los_Angeles, but it failed. then I used this command command-sudo dpkg -conconfigure tzdata, which will provide you with a graphical interface for setting the time zone, and then you will have to restart jenkins using the sudo / etc / init.d / jenkins stop sudo / etc / init commands. d / jenkins start

Hope this helps! Hooray practical

0
source

Source: https://habr.com/ru/post/1014937/


All Articles