Jenkins timezone weird behaviour

82 views
Skip to first unread message

maxim.c...@ingeno.ca

unread,
Apr 3, 2017, 11:23:07 AM4/3/17
to Jenkins Users
Hi guys,

   I've got some issue configuring timezone on my jenkins server running on docker.

The centos7 is sync to the good time, the jenkins docker container also has the good time when i logged to it.

i added this to the Dockerfile:
ENV TZ="/usr/share/zoneinfo/EST5EDT"

i also set the time zone via the JAVA_ARGS.

Jobs executions and Page generated display the good time.

the Issue is from the log file and the maven execution (maven.build.timestamp), they both display one hour late and at this point i really don't understand where that come from.

Do you have any idea?

Thanks in advance!

 

Mark Waite

unread,
Apr 3, 2017, 11:28:53 AM4/3/17
to Jenkins Users
I had to set -Duser.timezone=America/Denver in JAVA_OPTS (rather than JAVA_ARGS) and I had to set the env variable TZ=America/Denver as well.

I don't see any mention of JAVA_ARGS in the Dockerfile, so I'm not sure how it is used.  Are you sure it shouldn't be JAVA_OPTS?

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e1790239-07e8-4620-bfab-d06b97567f33%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

maxim.c...@ingeno.ca

unread,
Apr 3, 2017, 11:33:37 AM4/3/17
to Jenkins Users
the jenkins docker image transpose JAVA_OPTS to JAVA_ARGS

exec java "${java_opts_array[@]}" -jar /usr/share/jenkins/jenkins.war "${jenkins_opts_array[@]}" "$@"

sorry for the confusion

maxim.c...@ingeno.ca

unread,
Apr 4, 2017, 9:06:35 AM4/4/17
to Jenkins Users
It really looks like those 2 pieces are not daylight savings aware.

Is there some known other configurations?
Reply all
Reply to author
Forward
0 new messages