[JIRA] (JENKINS-60101) can not change timezone when using Docker jenkinsci/blueocean

8 views
Skip to first unread message

blankhang@gmail.com (JIRA)

unread,
Nov 8, 2019, 4:28:03 AM11/8/19
to jenkinsc...@googlegroups.com
blank hang created an issue
 
Jenkins / Bug JENKINS-60101
can not change timezone when using Docker jenkinsci/blueocean
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: docker
Created: 2019-11-08 09:27
Environment: my docker-compose.yml

version: '3.1'

services:
  jenkins:
    image: jenkinsci/blueocean
    container_name: jenkins
    privileged: true
    restart: always
    user: root
    ports:
      - '8080:8080'
    volumes:
     - '/app:/app'
      - '/usr/share/fonts:/usr/share/fonts'
      - './jenkins_home:/var/jenkins_home'
      - '/etc/localtime:/etc/localtime'
      - '/etc/timezone:/etc/timezone'
      - '/var/run/docker.sock:/var/run/docker.sock'
      - '/usr/lib/x86_64-linux-gnu/libltdl.so.7:/usr/lib/x86_64-linux-gnu/libltdl.so.7'
      - '~/.ssh:/var/jenkins_home/.ssh'
      - '~/.m2:/root/.m2'gnu/libltdl.so.7'
      - '~/.ssh:/var/jenkins_home/.ssh'
      - '~/.m2:/root/.m2'
Priority: Minor Minor
Reporter: blank hang

can not change timezone  

after trying many methods

https://stackoverflow.com/questions/55055357/jenkins-in-docker-how-to-change-timezone

https://wiki.jenkins.io/display/JENKINS/Change+time+zone

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Nov 8, 2019, 4:41:02 AM11/8/19
to jenkinsc...@googlegroups.com
Carlos Sanchez commented on Bug JENKINS-60101
 
Re: can not change timezone when using Docker jenkinsci/blueocean

as the stackoverflow post says, you can use the TZ env var

blankhang@gmail.com (JIRA)

unread,
Nov 8, 2019, 4:54:04 AM11/8/19
to jenkinsc...@googlegroups.com

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Nov 8, 2019, 5:06:02 AM11/8/19
to jenkinsc...@googlegroups.com

kutzi@gmx.de (JIRA)

unread,
Dec 19, 2019, 4:39:02 AM12/19/19
to jenkinsc...@googlegroups.com
kutzi commented on Bug JENKINS-60101

I'm seeing the same issue. You can test it with a shell script/step:

date '+%z'
export TZ=Europe/Berlin
date '+%z'

When running inside the docker agent it return sth like:
0000
0000

So setting the TZ has clearly no effect.
When running on the host, where the docker agent is running, directly, it returns the expected result.

Reply all
Reply to author
Forward
0 new messages