matthuisman / docker-kodi-headless

A headless install of kodi in a docker container
GNU General Public License v3.0
136 stars 13 forks source link

Feature request: Configure Kodi timezone #23

Closed imathew closed 1 year ago

imathew commented 1 year ago

It would be nice if Kodi could run under my own timezone, so that when I manually scan in an episode from another instance of Kodi it appears in the correct order in the "latest episodes" section. I have a workaround, but thought it was worth recording here for your consideration. I remember that earlier headless kodi containers allowed this via passing in a TZ environment variable.

I noticed in the headless kodi.log that the time was correct on boot, but by the end of the startup process it had changed to UTC. I had tried to change the timezone in guisettings.xml, but it overwrites on startup (and if I set it to readonly it won't load at all). And when I run "date" in the docker shell it shows my local time, so I wasn't sure what was wrong.

Eventually I found that /etc/localtime was out. Since I am using a Linux host, a workaround that is doing the trick for me is sharing the host version with the container, by setting a volume like this: /etc/localtime:/etc/localtime:ro. And I'm happy to keep doing that if this isn't a change worth making. Love this image!

matthuisman commented 1 year ago

added back the TZ env variable to the reademe. i had removed it as for me, I needed to set it inside kodi istelf

imathew commented 1 year ago

Oh, I did have the environment variable set (just in case) but it didn't do the trick. The only thing that has worked for me (in the latest Matrix) is setting the localtime file.

matthuisman commented 1 year ago

latest image building now should set /etc/localtime inside the container to the passed in TZ. Kodi uses this to set its timezone