Jump to content

How to set the timezone in docker container


pcm2a

Recommended Posts

For any of you docker experts does anyone know how to set the timezone in an Emby docker container?

 

Tried:

- Setting the TZ property in the docker environment variables (in the gui)

- Linking the systems /etc/localtime to container /etc/localtime

- Linking the systems /etc/timezone to container /etc/timezone

- Setting the time manually using the date command

/ # date
Fri Mar  8 12:24:07 UTC 2019

What I ended up with was the time set correct because of the date command but the timezone still wrong. None of the above items changed it from UTC to CST.

Link to comment
Share on other sites

That link mostly says you need to set the TZ variable, which from my original post I already have set and it doesn't do anything. However, from that guide and other guides it talks about this "tzdata" command. This command does nothing when I run it and I'm thinking that might be the problem. If the Emby docker container is not including the tzdata package then the TZ environment variable isn't going to be used.

 

I created a bug here so maybe one of the devs can check into it: https://github.com/MediaBrowser/Emby.Build/issues/79

Link to comment
Share on other sites

Yea just keep in mind, we focus our efforts on the native Synology package, I am not sure when we will look into it, and if your TZ is set correctly then there's a very good chance there's nothing we can do about it.

Link to comment
Share on other sites

Yeah makes sense. The bug for whoever maintains the docker image is more appropriate than here.

 

I have requested access to the native beta and will try it out once I have it. Problems I forsee will be:

- How to migrate while maintaining all my config data.

- Once on a native beta if a beta has some critical issue will it be easy to change beta versions? With docker this should be fairly easy.

Link to comment
Share on other sites

We maintain our Docker image, I'm just saying that it could be in the Docker software on this particular platform.

Link to comment
Share on other sites

  • 4 years later...
isamudaison

A few years late, but I ran into this (still an issue with the official image not containing the tzselect package); There is a nice workaround (if you want the container to maintain the same TZ as the host, anyway) by adding these volume mappings:

- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...