MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Recurring calendar events are off by a day

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 2.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      justinreimer @sdetweil
      last edited by

      @sdetweil

      So the good news is that commenting out the above lines did fix the issue with the event I posted about above.

      The bad news is that it caused issues with other events that were previously working.

      Here’s the VEVENT data associated with one of the newly mis-behaving events

      BEGIN:VEVENT
      CREATED:20220811T165129Z
      UID:C8B93B02-3057-41F6-A69A-F4959C342E02
      RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE
      DTEND;TZID=America/Los_Angeles:20220808T210000
      TRANSP:OPAQUE
      X-APPLE-TRAVEL-ADVISORY-BEHAVIOR:AUTOMATIC
      SUMMARY:My Custom Event
      LAST-MODIFIED:20220811T165146Z
      DTSTAMP:20220811T165147Z
      DTSTART;TZID=America/Los_Angeles:20220808T190000
      SEQUENCE:1
      END:VEVENT
      

      This new event that is now wrong is a weekly repeating event that is scheduled for every Monday and Wednesday at 7:00 PM. However, the calendar module on the Magic Mirror is now showing it happening every Sunday and Tuesday at 7:00 PM.

      S 2 Replies Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @justinreimer
        last edited by

        @justinreimer that’s what I was afraid of.

        put them back. let me look at it some more

        thanks for the other event

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @justinreimer
          last edited by sdetweil

          @justinreimer the problem is the library that handles the recurring events

          sometimes it gets its date/times messed up , the new event
          if got 2 events per week, BUT used the correct DATE and the UTC TIME, and THAT turns into the day before in LA timezone. which is what the code we commented out fixes…

          [11.08.2022 12:12.47.262] [DEBUG] start: Mon Aug 08 2022 19:00:00 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.47.263] [DEBUG] end:: Mon Aug 08 2022 21:00:00 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.47.264] [DEBUG] duration: 7200000
          [11.08.2022 12:12.47.264] [DEBUG] title: My Custom Event
          [11.08.2022 12:12.47.265] [DEBUG] Search for recurring events between: Thu Aug 11 2022 12:12:47 GMT-0700 (Pacific Daylight Time) and Thu Aug 10 2023 23:59:59 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.47.300] [DEBUG] Title: My Custom Event, with dates: ["2022-08-15T02:00:00.000Z","2022-08-17T02:00:00.000Z",
          

          except the 1st event

          [11.08.2022 12:12.46.698] [DEBUG] start: Thu Aug 11 2022 19:00:00 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.46.698] [DEBUG] end:: Thu Aug 11 2022 19:15:00 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.46.699] [DEBUG] duration: 900000
          [11.08.2022 12:12.46.699] [DEBUG] title: This is a test Event
          [11.08.2022 12:12.46.700] [DEBUG] Search for recurring events between: Thu Aug 11 2022 12:12:46 GMT-0700 (Pacific Daylight Time) and Thu Aug 10 2023 23:59:59 GMT-0700 (Pacific Daylight Time)
          [11.08.2022 12:12.46.782] [DEBUG] Title: This is a test Event, with dates: ["2022-08-12T02:00:00.000Z","2022-08-19T02:00:00.000Z",
          

          is processed correctly…

          unfortunately i cannot tell that one is ok, and the other is not.
          if u take off the BYDAY on the second event then its ok…

          ------
          hm… try this …

          uncomment, and add this line above each line you had commented out

            if(curEvent.rrule.origOptions.byweekday !== undefined)
          

          this checks to see if the vevent rrule explicitly specified byday… if so, it corrects…
          otherwise not

          seems to work for me

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            justinreimer @sdetweil
            last edited by

            @sdetweil Yep that seems to have fixed it. Checked the next 30 events on my calendar, and they all seem to match up now. Thanks!

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @justinreimer
              last edited by

              @justinreimer I have submitted fix https://github.com/MichMich/MagicMirror/pull/2905
              for the next release

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • A akriegshauser referenced this topic on
              • O oldrocker referenced this topic on
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy