bastilimbach / docker-MagicMirror

Docker image for the Magic Mirror 2 project by Michael Teeuw.
https://hub.docker.com/r/bastilimbach/docker-magicmirror/
MIT License
185 stars 54 forks source link

Wrong time zone on calendar events #27

Closed magpern closed 5 years ago

magpern commented 5 years ago

I have the docker running on a ubuntu server. All time zones and time is correct. The RPi showing the magic mirror from the docker host is also set with correct time zone. The clock in magic mirror is correct, but calendar events are off by a few hours. Event is set as 07:45 CEST but shows as 09:45

I solved this by supplying the docker with a TZ=Europe/Stockholm environment variable. Perhaps the readme file should reflect this.

This is a working docker-compose snipplet for magic mirror docker

  magicmirror:
    container_name: magicmirror
    image: bastilimbach/docker-magicmirror
    restart: unless-stopped
    environment:
      - TZ=Europe/Stockholm
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ~/magic_mirror/config:/opt/magic_mirror/config
      - ~/magic_mirror/modules:/opt/magic_mirror/modules
    ports:
      - 8888:8080
bastilimbach commented 5 years ago

Issue #15 is probably related to this one. It might actually not be a bad idea to include a small section in the README. Do you maybe want to create a PR for this?

bastilimbach commented 5 years ago

A "Frequently asked questions" section with "My timezone is wrong, how can I fix this?" would be quite useful. This could also be expanded in the future.

bastilimbach commented 5 years ago

Thanks again for the PR! 🎉