Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone correct, modules won't follow it #50

Open
squirtbrnr opened this issue Nov 25, 2020 · 5 comments
Open

Timezone correct, modules won't follow it #50

squirtbrnr opened this issue Nov 25, 2020 · 5 comments

Comments

@squirtbrnr
Copy link

I am running this docker on a Synology NAS. I got it up and running with no issue. I set the timezone variable and also linked /etc/localtime. When I check the date/time of the container it is correct and matches the host system. The clock module is also correct with the correct time (with or without the time zone config line for the module). However, other modules such as a sports scoreboard, an "on this day" calendar, and even the holidays calendar seem to be running on UTC, not my actual timezone (UTC -6). In otherwords, right now my clock, the container, and system shows it is 20:45 on 11/24, but the other modules have all switched to showing things as if it was 11/25. No errors in the docker logs or system logs. The docker logs also appear to be in UTC time as the generated logs are showing 11/25 already. Here is my docker cli command. What's causing modules to ignore the timezone?

docker run -d \
  --name=magicmirror \
  --restart no \
  -v /volume1/docker/magicmirror/config:/opt/magic_mirror/config \
  -v /volume1/docker/magicmirror/modules:/opt/magic_mirror/modules \
  -v /etc/localtime:/etc/localtime:ro \
  -e TZ=America/Chicago \
  -p 8081:8080 \
  bastilimbach/docker-magicmirror:v2.13.0
@ckboyle
Copy link

ckboyle commented Jan 4, 2021

I'm seeing something similar in my calendar module - only it differs by calendar and sometimes even by event within a calendar.

I switched to the "develop" branch as someone on the MagicMirror repo mentioned a similar issue was fixed in the develop branch. That develop branch as a standalone install works correctly, but when I use the container I have the mishmash of timezones in my calendars.

@Legion2
Copy link
Contributor

Legion2 commented Jan 4, 2021

try to start the container and open a shell (sh, bash) and then use the date command to check if the date is set correctly.

docker run -it --rm
  -v /etc/localtime:/etc/localtime:ro \
  -e TZ=America/Chicago \
  bastilimbach/docker-magicmirror:v2.14.0 \
  bash

@ckboyle
Copy link

ckboyle commented Jan 4, 2021

Yes - running date from a bash prompt inside the container returns the correct date.

@squirtbrnr
Copy link
Author

the date command returns the correct time date.

timezone environment variable is set and the localtime folder is mapped to the container.

I just noticed v2.14.0 was released 3 days ago. I’m running v2.13.0, so I’ll have to test this again later.

@Legion2
Copy link
Contributor

Legion2 commented Jan 4, 2021

when the date and time is correctly set in the container, it must be a problem of MagicMirror not using it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants