Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set timezone in container #70

Closed
timmipetit opened this issue Jun 12, 2015 · 6 comments
Closed

Can't set timezone in container #70

timmipetit opened this issue Jun 12, 2015 · 6 comments
Assignees
Projects

Comments

@timmipetit
Copy link

We're running into timezone issues because the docker-selenium containers have a different timezone than our host has. This is mostly due to this line in the Dockerfile:

ENV TZ "US/Pacific"

We can fix /etc/timezone and /etc/localtime by running the container with: -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:r, but that doesn't allow us to overwrite the TZ env var. This results in tools like date and Firefox still using the US/Pacific timezone.

@timmipetit
Copy link
Author

I found out that I could fix this by doing docker run -e TZ="Europe/Amsterdam". Maybe this should be added to the docs? Because it seems a non-standard way of setting timezone for a container.

@ghost
Copy link

ghost commented Jun 12, 2015

the NodeBase has TZ set which means it will propagate to all the Nodes (however Hub doesn't get TZ set so booo... we can fix it by moving TZ setting to Base image).

A case could be made to chagne TZ to be Zulu and operate on UTC for all.

And yes, when you docker run add the TZ you need with -e TZ="<your tz>"

So I vote on 2 things:

  1. move TZ to Base Docker file so Hub gets it
  2. set TZ to utc timezone as universal

thoughts?

@ghost ghost added the help wanted label Aug 28, 2015
@manoj9788
Copy link
Member

Recently I ran into this issue and used the docker run -e TZ="< >" as well.
What sort of help is required to fix this ?

@ddavison ddavison self-assigned this Jan 18, 2017
@ddavison ddavison added the I-all label Jan 18, 2017
@ddavison
Copy link
Member

agreed, @RubyTester, both points. making those changes now.

@ddavison
Copy link
Member

also wrote a quick'n'simple wiki to using it: https://github.com/SeleniumHQ/docker-selenium/wiki/Setting-a-Timezone

@manoj9788
Copy link
Member

Long back, got this fixed and added it to Leo's repo and not here. Should have added here too.
elgalu/docker-selenium@767bdd6

camiller2 added a commit to camiller2/docker-selenium that referenced this issue Feb 23, 2017
…rsion args WIP on firefox-: 46: 46: Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place. Updated config to be 2x compatible. Updated Makefile with new name of fl-selenium Updated generate to take namespace as argument. Changed firefox version to 46.0.1 and selenium version to 2.53.1 3 hours ago Added selenium version args updated usage example 12 hours ago Some fixes...sort of working Finished build scripts (for now) Improved build.sh Added build script Added selenium version args yesterday Merge pull request SeleniumHQ#394 from wheleph/master 2 days ago edit dockerfiletxt for SeleniumHQ#386 Merge pull request SeleniumHQ#386 from a-k-g/add-dbus-to-etc-environment update to selenium v3.1.0 4 days ago Add comment about time units used in environment variables 6 days ago Set proper GRID TIMEOUT value Add DBUS_SESSION_BUS_ADDRESS to /etc/environment (Fixes SeleniumHQ#358) a week ago update chromedriver/geckodriver. closes SeleniumHQ#384 Updated ChromeDriver to latest (2017-02-06; v2.27) Merge pull request SeleniumHQ#377 from alexgibson/firefox-51 2 weeks ago Update NodeFirefox to use 51.0.1 Merge pull request SeleniumHQ#374 from ryneeverett/tighten-readme Fix heading hierarchy consistency. Delete unnecessary code blocks. Merge branch 'master' of github.com:seleniumhq/docker-selenium 3 weeks ago add TZ to Base image to propegate to all. default timezone to UTC rather than US/Pacific. closes SeleniumHQ#70; fermium release Merge pull request SeleniumHQ#366 from atlassian/geckodriver-v0.13.0 erbium release ignore iml files Upgrade to firefox 50.1.0, geckodriver v0.13.0 Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place.
camiller2 added a commit to camiller2/docker-selenium that referenced this issue Feb 23, 2017
…n args WIP on firefox-: 46: 46: Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place. Updated config to be 2x compatible. Updated Makefile with new name of fl-selenium Updated generate to take namespace as argument. Changed firefox version to 46.0.1 and selenium version to 2.53.1 3 hours ago Added selenium version args updated usage example 12 hours ago Some fixes...sort of working Finished build scripts (for now) Improved build.sh Added build script Added selenium version args yesterday Merge pull request SeleniumHQ#394 from wheleph/master 2 days ago edit dockerfiletxt for SeleniumHQ#386 Merge pull request SeleniumHQ#386 from a-k-g/add-dbus-to-etc-environment update to selenium v3.1.0 4 days ago Add comment about time units used in environment variables 6 days ago Set proper GRID TIMEOUT value Add DBUS_SESSION_BUS_ADDRESS to /etc/environment (Fixes SeleniumHQ#358) a week ago update chromedriver/geckodriver. closes SeleniumHQ#384 Updated ChromeDriver to latest (2017-02-06; v2.27) Merge pull request SeleniumHQ#377 from alexgibson/firefox-51 2 weeks ago Update NodeFirefox to use 51.0.1 Merge pull request SeleniumHQ#374 from ryneeverett/tighten-readme Fix heading hierarchy consistency. Delete unnecessary code blocks. Merge branch 'master' of github.com:seleniumhq/docker-selenium 3 weeks ago add TZ to Base image to propegate to all. default timezone to UTC rather than US/Pacific. closes SeleniumHQ#70; fermium release Merge pull request SeleniumHQ#366 from atlassian/geckodriver-v0.13.0 erbium release ignore iml files Upgrade to firefox 50.1.0, geckodriver v0.13.0 Updated makefile, generate.sh scripts, and Dockerfile.txt so that maintianer is supplied in one place.
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Tracking
  
Done
Development

No branches or pull requests

3 participants