Time incorrect in log file in docker

I’m running OH in a docker on a Synology NAS. The time on my NAS is correct (when checking with the date commend). The time in my docker container is correct when checking with the date command in the docker container. I started the docker container command line with following -v parameters
-v /etc/localtime:/etc/localtime:ro -v /etc/TZ:/etc/TZ:ro
In the openhab configuration (Paper UI) time zone and country information is set to Europe/Brussels and correct country even coordinates.

Yet when looking at he log files the time in the log files is 2 hours off and showing time in UTC.

I’m a bit lost, how can I make the log file reflect the correct time?

I usually map in /usr/share/zoneinfo as well. If that doesn’t work, I don’t know what it could be. I don’t use Synology.

Tried it but no luck :slight_smile:

but setting the ENV setting TZ to Europe/Brussels solved it.

Correction, it’s not entirely solved. The entire OH system runs on correct time except the log files are still off. I found the issue in another post [SOLVED] Log time vs System Time - Mismatch (No Timezone Adjustment)

But don’t know how to set this in docker. I can’t find the files being referred to.

Any idea?

I have the same problem with OH3 and a synology docker, did you found a solution?

Set TZ = Europe/Berlin for example in environment variable before running the docker will solve this problem.

1 Like