Time zone in Docker / scheduled downtimes off

Hi everyone!

After moving my Icinga to a container based setup, my downtimes seem to be off by one hour. I have made sure that time and time zone are correct in the container (both icinga2 and icingaweb), but they are still displayed one hour off in Icingaweb. I’m pretty sure they will become active an hour off as well.

How can this be fixed properly? I mean I could define my downtimes in UTC, but then I’d have to make them an hour longer to take DST into account.

Cheers

Okay, so the downtimes seem to be fixed now. I have no idea why it wasn’t fixed right after I updated the time zones in Docker, but anyway, it works now.

Here’s a Docker compose snippet on how to get the proper time zone inside the container:

    volumes:
    [...]
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - TZ=Europe/Berlin

Display in Firefox is still off because it reports time zone offset as 0, but that’s a different problem… :wink:

1 Like