Closed GravityRZ closed 6 years ago
I've tested setting the timezone via the TZ variable and it seems to work. Could you try it for your container?
Also, I just added a manual timezone support and pushed it to the develop branch: https://github.com/marcoraddatz/homebridge-docker/tree/develop#homebridge_timezone Thanks for reporting!
i tried that but did not work
do i need to use another vaiable?
Yes, it should be the timezone: F.e. TZ=Europe/Berlin
Alternatively you can use the develop branch and set the HOMEBRIDGE_TIMEZONE.
tried it, still not working. to be sure we are talking about the same thing. at the entry millieu i add the variabel TZ=Europe/Berlin i check the time which is displayed in the log when the container starts up. this time is 2hours behind.
i also read that mapping /etc/localtime to /etc/localtime works but it does not. i can not map /etc so i copied local time to /docker and mapped that file to /etc/localtime. still not working
Yes, we're talking about the same thing. I set up my container with docker run -e TZ=Europe/Berlin xxxx
and it all loaded. The feature I added yesterday (and which is only available in the develop branch so far) modifies the etc/localtime, as you said: https://github.com/marcoraddatz/homebridge-docker/blob/develop/image/run.sh#L57
ok so maybee the TZ variable only gets accepted through the commandline and not the gui. (will test)
how can i get that latest branch image?(github is a mystery to me)
tried commandline: not working. still 2 hours behind
Pretty strange. However: You can also get the latest version via Docker Hub, simply select "develop" from the list of available downloads: https://raw.githubusercontent.com/marcoraddatz/homebridge-docker/master/doc/docker-1.png
well, downloaded new image, build new container, added new variable but still 2 hours behind.
hopefully the variable setting is wrong otherwise i am out of luck
Sorry for the confusion: The HOMEBRIDGE_TIMEZONE
must be set in the .env file, which is in the samples folder and must be placed next to the config.json
. https://github.com/marcoraddatz/homebridge-docker/tree/develop#env-options
Ahh. ok now i know what to do but i still get the error .env not found there is a .env file in the docker/homebridge directory. the same directory as al the other config files
don't ask why but somehow the .env file got found. still 2 hours behind while i pulled the latest development version
i will give up on this since this is taking up alot of time
Can absolutely understand that. Will test that on other machines! Thanks for your efforts!
I just tested this option and works as supposed. (Docker is one hour behind, but the container sets the correct date).
this seems to be a very old issue. do not know if this is realted to docker or setting a TZ environment in the docker file
is there a way to set the timezone for this container or perhaps copy it from the system.
it is using UTC while i am in CEST(europe)