• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-Calendar always shows 23:59 if showEndTime: True

Scheduled Pinned Locked Moved Bug Hunt
51 Posts 4 Posters 12.3k Views 3 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.
  • S Offline
    SwissChemist
    last edited by Sep 26, 2020, 10:55 PM

    Hello,

    I don’t have much experience in software development, but so far I have been quite successful in setting up my MagicMirror.

    Nevertheless I am struggling with the calender module with the following two issues:

    1. showEnd: true
      Although I managed to get the right start time with the help of “Timeshift calendar issue / Recurring Google Calendar events for times when UTC date differ from local date appear at wrong time in MM #1798”, I can only see 23:59 for the end time for recurring events on my iCalendar. (With non recurring events, the end time is correct!)
      All the examples and maybe also most testers set the parameter showEnd to ‘false’, then this problem cannot be seen.

    2. For 3-weekly events (whole day), the timeshift problem seems to be unsolved?! In this case I can see a wrong date. With weekly and biweekly events (whole day) everything works fine!

    Can anybody confirm if these issues are still present, or has anybody an idea, what might be wrong with my files?

    {
    			module: "calendar",
    			header: "Familie",
    			position: "top_left",
    			config: {
    				maximumEntries: 25,
    				maximumNumberOfDays: 365,
    				showLocation: false,
    				maxTitleLength: 25,
    				maxLocationTitleLength: 25,
    				wrapEvents: true,
    				wrapLocationEvents: false,
    				maxTitleLines: 3,
    				maxEventTitleLines: 3,
    				fetchInterval: 300000, //default: 300000
    				animationSpeed: 2000,
    				fade: true,
    				fadePoint: 0.25,
    				displayRepeatingCountTitle: true,
    				dateFormat: "MMM Do",
    				dateEndFormat: "HH:mm",
    				showEnd: true,
    				fullyDayEventDateFormat: "MMM Do",
    				timeFormat: "absolute",
    				getRelative: 6,
    				urgency: 1,
    				broadcastEvents: true,
    				hidePrivate: false,
    				sliceMultiDayEvents: false,
    				nextDaysRelative: true,
    				calendars: [
    					{
    						symbol: "home",
    						url: "webcal://..."
    					}
    				]
    			}
    		},
                                    ...
    Thanks very much for your support!
    S 1 Reply Last reply Sep 26, 2020, 10:57 PM Reply Quote 0
    • S Offline
      sdetweil @SwissChemist
      last edited by Sep 26, 2020, 10:57 PM

      @SwissChemist see the calendar temp fixes at the top of the troubleshooting section

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • S Offline
        SwissChemist
        last edited by SwissChemist Sep 28, 2020, 7:32 PM Sep 28, 2020, 7:11 PM

        Dear Sam,
        I have exactly done what is written in your instructions.
        The start date is shown correctly, but there are two issues left:

        1. with ‘showEnd: True’ I can see 23:59 for recurring events (not whole day) on my calendar. (With non recurring events, the end time is correct!)
        2. some dates for recurring events (whole day) are wrong.

        I have prepared an ics-file and a screenshot of my MagicMirror Monitor for comparison.

        The following dates are wrong:
        3-weekly whole day - 22.Okt should be: 21.Okt
        Weekly whole day - 26.Okt should be: 27.Okt
        2-weekly whole day - 27.Okt should be: 28.Okt
        Monthly whole day - 1.Nov should be 2.Nov
        Weekly whole day - 2.Nov should be 3.Nov
        Weekly whole day - 9.Nov should be 10.Nov
        2-weekly whole day - 10.Nov should be 11.Nov
        …
        I have defined a test calendar, ich which all weeklys are planned for the same day, all 2-weeklys are planned for the same day, all 3-weeklys are planned for the same day. So you can easily see if these dates differ, there is a mistake…
        Files and a MagicMirror picture are attached.

        Thanks very much for your support!

        ![0_1601321066459_MagicMirror.JPG](Uploading 100%)
        [0_1601321084756_myCalendar](Uploading 100%)

        S 1 Reply Last reply Sep 28, 2020, 7:40 PM Reply Quote 0
        • S Offline
          sdetweil @SwissChemist
          last edited by Sep 28, 2020, 7:40 PM

          @SwissChemist please see my cat message…

          i assume you are gmt+ something…

          there is a newly found bug in the repeating rule parser, which I am working on. but it might be a while…

          if the normal time of the event is not exceeded by your tz offset then the event date is (in gmt) the prior day.
          then the rule calculates, and gets the current day, and the jams the prior to midnight time onto the event, now it is 24 hours later…

          at the time the calculation and adjustment is done, the rule processor doesn’t know the original effect of the timezone offset

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Sep 28, 2020, 7:46 PM Reply Quote 0
          • S Offline
            SwissChemist
            last edited by Sep 28, 2020, 7:43 PM

            You are right, now in summer, we are GMT+1, in winter it’s GMT+2…

            S 1 Reply Last reply Sep 28, 2020, 9:57 PM Reply Quote 0
            • S Offline
              sdetweil @sdetweil
              last edited by Sep 28, 2020, 7:46 PM

              @SwissChemist

              no the one I am fighting from Australia

              meeting at 09/28/20, 08:30
              utc is 09/27/20, 22:30

              rule detemines today is valid DATE
              takes todays date 09/28, with yesterdays time 22:30
              oops…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Sep 28, 2020, 8:41 PM Reply Quote 0
              • S Offline
                sdetweil @sdetweil
                last edited by Sep 28, 2020, 8:41 PM

                @sdetweil so, your 1st entry is confusing… label is
                SUMMARY:Monthly 17-18
                but the cal entry says
                DTSTART;TZID=Europe/Zurich:20201002T170000, Oct 02, 1700 local, 1500 utz

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil
                  last edited by Sep 28, 2020, 9:18 PM

                  also, showEnd is a pain… technically the clock is day:00:00 to day 23:59 as 23:59+1 is 24:00/00:00 which is the next day

                  so, what do you think we should be showing there…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S 1 Reply Last reply Sep 30, 2020, 7:40 PM Reply Quote 0
                  • S Offline
                    sdetweil @SwissChemist
                    last edited by sdetweil Sep 28, 2020, 10:17 PM Sep 28, 2020, 9:57 PM

                    @SwissChemist want to try a fix for me…

                    edited: changed added line

                    edit the ~/MagicMirror/modules/default/calendar/calendarfetcher.js
                    find this (approx line 240) and add the one line listed below

                    						// Loop through the set of date entries to see which recurrences should be added to our event list.
                    						for (let d in dates) {
                    							const date = dates[d];
                    							// ical.js started returning recurrences and exdates as ISOStrings without time information.
                    							// .toISOString().substring(0,10) is the method they use to calculate keys, so we'll do the same
                    							// (see https://github.com/peterbraden/ical.js/pull/84 )
                    							const dateKey = date.toISOString().substring(0, 10);
                    							let curEvent = event;
                    							let showRecurrence = true;
                    							let duration = 0;
                    
                    							startDate = moment(date);
                    							duration = parseInt(moment(curEvent.end).format("x")) - parseInt(moment(curEvent.start).format("x")) // --- add this line
                    

                    in your timezone (mine is Sep 28, 17:15)

                    Screenshot at 2020-09-29 00-14-48.png

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      SwissChemist
                      last edited by SwissChemist Sep 29, 2020, 8:51 PM Sep 29, 2020, 8:42 PM

                      Hello Sam,
                      thanks very much for your great support.
                      Good news is that the endTime issue is solved now!

                      Nevertheless with recurring whole day events, the following entries are not correct yet:

                      3-weekly 13-14 is completely missing (should be 1.Okt)

                      Starting with the 3-weekly whole day 22.Okt (should be 21.Okt), every following ‘whole day meeting’ is shown one day too late.
                      You can easily see that even on your picture, as e.g. the 3-weekly whole day and the 3-weekly 13-14 should always take place at the same date.

                      Even on your picture this is not the case… monthly whole day is shown in 3 days, monthly 17-18 is shown in 4 days.

                      Once more, thanks for your great support so far!
                      ![0_1601412306493_MagicMirror_200929.JPG](Uploading 100%)

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 1 / 6
                      1 / 6
                      • First post
                        3/51
                        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