Read the statement by Michael Teeuw here.
Default Calendar lists events one day early
-
I have a public google calendar using the iCal url. This has been working for probably 3 years at this point, no issues. I’ve recently noticed (wife says it’s been a long time, but she didn’t say anything :man_shrugging: ) that ‘all day’ calendar events shown on MM are shown as starting one day early - for example a birthday that is on the 23rd is shown on MM as the 22nd. However, an event with a fixed duration is listed on the correct date.
I’m in the pacific time zone. The Pi is configured correctly. MM is running in a container, which shares the time config.
This seems to have occurred with at least one other user. I would have responded to his thread but it’s coming up on it’s second birthday with no responses :-)
https://forum.magicmirror.builders/topic/13230/calendar-2hours-for-all-day-event?_=1648003429696
-
@sdetweil Thanks for the quick reply!
I had previously verified that all ‘levels’ of the mm are using the correct date and time, and display their timezone properly. The pi, the container, and the display pi were all set to PDT and the time/date was correct. I verified this with the ‘date’ command at a bash terminal.
The container was syncing to the rpi hosts time by mapping the localtime as a volume.
version: '3' services: magicmirror: container_name: magicmirror image: mm2022:latest restart: always volumes: - /etc/localtime:/etc/localtime:ro - ./magic_mirror/config:/opt/magic_mirror/config - ./magic_mirror/modules:/opt/magic_mirror/modules ports: - 8888:8080
From your comment I decided to set the TZ environment variable in my container as well.
services: magicmirror: container_name: magicmirror image: mm2022:latest environment: TZ: America/Los_Angeles restart: always volumes: - /etc/localtime:/etc/localtime:ro - ./magic_mirror/config:/opt/magic_mirror/config - ./magic_mirror/modules:/opt/magic_mirror/modules ports: - 8888:8080
This fixed my issue, and all day events now appear on the correct date.
Thanks again!
-
@asward2 what MM version are you running?
cd MagicMirror
grep version package.jsonshow me one of the events from the ICS file
to get the ics file docurl -sL ical_url >somefile.txt
edit somefile.txt
locate the vevent
BEGIN:VEVENT
.
.
.
END:VEVENT
u can change any of the text that shows personal info, please don’t edit the datesu can direct message me here or you can send an email
to my same userid on gmailI worked a while back with another user that had a similar problem (he was in Hawaii)…
turns out his system timezone was set to east coast… oops… -
@sdetweil Thanks for the quick reply!
I had previously verified that all ‘levels’ of the mm are using the correct date and time, and display their timezone properly. The pi, the container, and the display pi were all set to PDT and the time/date was correct. I verified this with the ‘date’ command at a bash terminal.
The container was syncing to the rpi hosts time by mapping the localtime as a volume.
version: '3' services: magicmirror: container_name: magicmirror image: mm2022:latest restart: always volumes: - /etc/localtime:/etc/localtime:ro - ./magic_mirror/config:/opt/magic_mirror/config - ./magic_mirror/modules:/opt/magic_mirror/modules ports: - 8888:8080
From your comment I decided to set the TZ environment variable in my container as well.
services: magicmirror: container_name: magicmirror image: mm2022:latest environment: TZ: America/Los_Angeles restart: always volumes: - /etc/localtime:/etc/localtime:ro - ./magic_mirror/config:/opt/magic_mirror/config - ./magic_mirror/modules:/opt/magic_mirror/modules ports: - 8888:8080
This fixed my issue, and all day events now appear on the correct date.
Thanks again!
-
@asward2 awesome