fboaventura / dckr-mrtg

:whale: Docker MRTG Instance that will configure monitoring from the environment variable.
https://hub.docker.com/r/fboaventura/dckr-mrtg/
MIT License
26 stars 17 forks source link

Add /etc/localtime to docker example #8

Closed michaelkrieger closed 2 years ago

michaelkrieger commented 2 years ago

The timezone with just setting TZ appears to be off and displaying UTC rather than the correct timezone. Mating in /etc/localtime and /etc/timezone fixes that.

michaelkrieger commented 2 years ago

Adding to this,

The system has the correct time. The docker container has the correct time and timezone (if I exec a shell in the container and type date and it has the correct timezone).

Yet the graphs made by 14all.cgi have the wrong time for "The statistics were last updated" and the wrong time on the right of the graph.

It seems /etc/localtime and /etc/timezone are needed to have correct behaviour of the perl script.

fboaventura commented 2 years ago

@michaelkrieger thank you!