Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    UNSOLVED Default calendar - parsing of VEVENT

    Troubleshooting
    2
    3
    80
    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.
    • evroom
      evroom last edited by

      HI,

      Can someone tell me how this Google event is parsed to the ‘data’ structure in calendarfetcher.js ?

      basic.ics part. (correct):

      BEGIN:VEVENT
      DTSTART;VALUE=DATE:20200330
      DTEND;VALUE=DATE:20200331
      DTSTAMP:20200329T132348Z
      UID:xxxl8quduqtvqbfe00fsk8xxx@google.com
      CREATED:20200329T132240Z
      DESCRIPTION:
      LAST-MODIFIED:20200329T132240Z
      LOCATION:
      SEQUENCE:0
      STATUS:CONFIRMED
      SUMMARY:TEST_ENTRY_FULLDAY
      TRANSP:TRANSPARENT
      END:VEVENT
      

      calendarfetcher.js part (incorrect):

      0|mm  | { type: 'VEVENT',
      0|mm  |   params: [],
      0|mm  |   start: { 2020-03-29T22:00:00.000Z tz: undefined, dateOnly: true },
      0|mm  |   end: { 2020-03-30T22:00:00.000Z tz: undefined, dateOnly: true },
      0|mm  |   dtstamp: { 2020-03-29T13:23:15.000Z tz: undefined },
      0|mm  |   uid: 'xxxul8quduqtvqbfe00fsk8xxx@google.com',
      0|mm  |   created: { 2020-03-29T13:22:40.000Z tz: undefined },
      0|mm  |   description: '',
      0|mm  |   lastmodified: { 2020-03-29T13:22:40.000Z tz: undefined },
      0|mm  |   location: '',
      0|mm  |   sequence: '0',
      0|mm  |   status: 'CONFIRMED',
      0|mm  |   summary: 'TEST_ENTRY_FULLDAY',
      0|mm  |   transparency: 'TRANSPARENT' }
      

      The background of this question, is that a full day event for tomorrow, is shown on the MM as Today.
      Based on the start and end date from the calendar module, this may seem right, but does not match my correct Google calendar DTSTART and DTEND dates.

      This annoys me already for some time (also happens for reoccurring full day events) and I wanted to see where it might go wrong.
      Unfortunately I am not skilled enough to see where the actual parsing part takes place.
      It seems to me ‘locale’ or timezone issue and converting to unixtime.

      And it also annoys me that it shows as Today or in XX Days, when I would like to see it as Mon Mar 30th, like my normal events.

      Greetings,

      E.J.

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @evroom last edited by

        @evroom the calendar parser is downlevel and causes all kinds of problems…

        it uses the ical library, which we deliver as part of the MM install… (NOT download latest)…
        see issue https://github.com/MichMich/MagicMirror/issues/1926

        the parser is in calendarfetcher.js
        uses the preloaded modules/default/calendar/vendor/ical.js

        if u replace the ical.js with the latest, it works much better (most of the time)

        1 Reply Last reply Reply Quote 0
        • evroom
          evroom last edited by

          @sdetweil said in Default calendar - parsing of VEVENT:

          uses the preloaded modules/default/calendar/vendor/ical.js

          Ah, that was the missing link !
          Now I understand where it comes from (I mean the ‘data’ stuff that calendarfetcher.js uses).

          Will try with latest ical.js.

          Thanks.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy