michaelmiklis / docker-rpi-monitor

RPI Monitor from RPi-Experiences implemented in a Docker Container
Apache License 2.0
67 stars 34 forks source link

Set Clock with correct timezone #12

Open TeraJaQ opened 3 years ago

TeraJaQ commented 3 years ago

how set the correct timezone?

TeraJaQ commented 3 years ago

sorry for the disturb but i've solved by adding a TZ= Europe/Rome in the environment section inside the docker-compose.. This is my docker-compose.yml

version: '3'
services:
  rpi-monitor:
    container_name: rpi-monitor
    image: michaelmiklis/rpi-monitor:latest
    restart: unless-stopped
    devices:
      - /dev/vcsm-cma:/dev/vcsm-cma
      - /dev/vchiq:/dev/vchiq
    volumes:
      - /proc:/dockerhost/proc:ro
      - /usr/lib:/dockerhost/usr/lib:ro
      - /etc:/dockerhost/etc:ro
      - /sys:/dockerhost/sys:ro
      - /boot:/boot
      - /opt/vc:/opt/vc
      - ./cgroup:/sys/fs/cgroup
#      - ./rpimonitor:/etc/rpimonitor  
#      - ./stat:/var/lib/rpimonitor/stat  #to store rrd db but don't work
    environment:
    - TZ=Europe/Rome
    ports:
    - "8888:8888"
BrodyStone21 commented 3 years ago

I'm using docker run but for me doing -e TZ=America/Indianapolis didn't throw any errors and everything appears to line up correctly.