It would be awesome if you allow passing in a configuration parameter when starting the docker container in order to set the time zone. Reading out the time zone from the host might not be always sufficient e.g.:
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.
https://wiki.jenkins-ci.org/display/JENKINS/Change+time+zone
An implementation similar to GITLAB_TIMEZONE would be great.
Found now an alternative way to set the timezone via
docker run ... -e JAVA_OPTS=-Duser.timezone=UTC
But a configuration solution as in Docker Gitlab would be nice and maybe more intuitive. What do you think about that?
Nice to know: As timezone you can set also e.g. Europe/London instead of UTC
+1
Thanks @subesokun I was wondering about this and your solution works. Wonder if there's a nicer way. What does the configuration solution for Docker Gitlab look like?
It is also possible to override the docker container timezone by appending the following volumes:
-v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime
Most helpful comment
It is also possible to override the docker container timezone by appending the following volumes:
-v /etc/timezone:/etc/timezone -v /etc/localtime:/etc/localtime