Skip to content

System timezone can't be changed? #17

@nichthinterfragen

Description

@nichthinterfragen

Experienced with Diladele 8.3 & 8.4 Docker image.

With the "TIME_ZONE=Europe/Berlin" var for env we provide the timezone for Diladele (or rather said Django). This works so far as can be seen well in Diladele webinterface.

What about the system timezone? It is set to etc/utc by default. I tried a bunch of stuff to change it but it won't change inside what the Diladele Webinterface is showing me. "tzdata" seems to be already installed in the base Ubuntu image that is used inside the Diladele Dockerfile.

What I tried so far:

  1. Adding a var to the env that specifies the value for the actual Linux $TZ var and running a script that sets it inside the Container Ubuntu Linux:

Compose snippet from my Stack:
environment:

  • TZ=Europe/Berlin
    command: >
    sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && exec /sbin/my_init"

Result: The container boots up normally and so does Diladele. $TZ equals Europe/Berlin. /etc/timezone for some reason is empty. Diladele still shows etc/utc as the system timezone. I guess this way is not working well. The one below does better from the looks of the respective timezone and other files.

  1. I mounted the Docker host timezone and localtime files as readonly inside the container with the $TZ var attached in the env:

Compose snippet from my Stack:
environment:

  • TZ=Europe/Berlin
    volumes:
  • "/etc/localtime:/etc/localtime:ro"
  • "/etc/timezone:/etc/timezone:ro"

Result: $TZ equals the set value. Content of timezone and localtime equal what is set on the Docker host. Docker Host timezone is set to Europe/Berlin btw. Diladele still says that the system timezone is etc/utc.

  1. I mixed both steps. Still Diladele says the system timezone is etc/utc.

Can this issue be even ignored? I plan on using Diladele with AD integration. Kerberos and such stuff can be very problematic with stuff like time being accurate. Do I have to build my own Image that implements fixes to this issue?

Mainly because I have a few Diladele servers running on Ubuntu 18.04 LTS with different Diladele versions. Ubuntu 18.04 LTS as you may know is EOL after May 2023 (unless you get a subscription for the Pro version which provides support until somewhere in 2027). So I discovered the Diladele Docker image.

Actually I have a list of issues with the image. I'm trying to fix issues on the way myself and write down the issue + fix at the moment to submit more issues.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions