UCS Docker container incorrect system time

I am using the univention/ucs-master-amd64 image from docker hub to test UCS under docker. Install & initial configuration appear fine but nothing samba related appears to work. In troubleshooting that I find that the UCS container system time is 11 hours in advance of host system time. My timezone is Australia/Sydney GMT+11. I can think of various ways to try to workaround this, but just ask the question here to see if anyone else has faced the same issue?

Should the docker container not simply sync it’s time from the host? What would be the best way to configure the UCS container to show actual local time?

Or alternately if this is not the intended behaviour would a bug report be appropriate?

Many thanks.

Ok, have just come across how to pass a timezone environment variable into the container at boot time. Trying that will update soon.

Used the docker run “-e” switch to pass “TZ=Australia/Sydney” to the container but to no avail. Container system time remains 11 hours in advance of the host system :frowning:

Strange, i just tried it and it works for me.
I created a new container with the parameters

“docker run -d --name --hostname= -e domainname= -e nameserver= -e rootpw= -e TZ=Australia/Sydney -p 8011:80 univention/ucs-master-amd64 /sbin/init”

and afterwards connected with

“docker exec -it /bin/bash” and the timezone is set correctly.

Did you wipe the old container completely and create it again?

Regards
Gronkdalonka

Yes, I did create a new container. Can I ask what your host OS is? I’m assuming it’s another UCS 4 instance ?

No i used a Debian as host, but i tried it again with a ucs 4.1-4 as host and the “-e TZ=Australia/Sysdney” parameter is working there as well.

Ok, thanks for the confirmation. I’ve been using a FreeNAS 10 Beta host. I did eventually get the timezone issue sorted out & it seems to have been an issue with the host OS. Appreciate your feedback.

Mastodon