(Docker) syncthing/relaysrv - Bug found? TZ ignored

Hi,

I’ve created a docker container using image: syncthing/relaysrv:latest. The container ignores my TZ env var if I look at the timestamps via “docker logs -f strelaysrv”.

I would expect the correct local time stamp in the log with this docker-compose.yml:

    environment:
      - TZ=Europe/XXXXX

This approach setting the env var also shows my correct local time for the syncthing/syncthing:latest docker container. To get the correct local time in the log of syncthing/relaysrv, I had to workaround by using this:

    volumes:
      - /etc/localtime:/etc/localtime:ro

Just to let you know :slight_smile: .

I think that’s just how go works.

I think so.

They’re the same nowadays. I think the difference is that the relaysrv etc Docker images don’t include tzdata so there’s no timezone information. That can be compiled in, or added as a package as I think we do in the “main” docker image.

Anyway, UTC is the only correct choice for server logs, so we’re just helping you out here, honestly. :wink:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.