Calendar: share event: too much unnecessary info: breaks QR-share

REPRODUCIBILITY : 100%
BUILD ID = OS VERSION : 3.4.0.22/24
HARDWARE : X, XA2
UI LANGUAGE: na
REGRESSION: yes

DESCRIPTION:

Sharing an event in Calendar via QR-Share fails because there are too many characters.
Sharing via e-mail reveals that there is too much unnecessary information.

PRECONDITIONS:

  1. QR-Share plugin
  2. Simple local event

STEPS TO REPRODUCE:

  1. create simple local calendar event
  2. share via QR-Share

EXPECTED RESULT:

QR code

ACTUAL RESULT:

Error message

ADDITIONAL INFORMATION:

(see also github QR-Share issue 18)
Sharing via email, saving the ICS file reveals:

  • 215 lines, doesn’t fit in one QR.
  • a simple “grep -v RDATE” gives 101 lines, which fits for QR-code.
  • hand editing to 45 lines gave me a working event, scanned and imported correctly.
  • Still, the QR-code looks too big for pratical use on a phone, but I don’t know enought ICS to make suggestions.

While “QR-Share” can do something about it, I suspect that Calendar is handling sharing just too dumb.

1 Like

Not really. You may have noticed that the “unnecessary” information you mentioned are the definition of the time zone your event is defined into. I guess the start date time of your event is given like:
DTSTART;TZID=Europe/Paris:20201110T134500
with a TZID. So to be complete (and conform to RFC as far as I know, see https://tools.ietf.org/html/rfc5545#section-3.8.3), the iCal format must provide a definition for this “Europe/Paris” case. This definition is taken from the tzdata package. Sadly, this definition can be a bit verbose sometimes. For instance, the one for Europe/Paris includes the changes from 1930… While just the latest changes are necessary (or the changes happening at the time of DTSTART and later, it’s not that simple).

The serialisation to iCal format is done by the KCalCore package and VTIMEZONE appending is done there : https://git.sailfishos.org/mer-core/kcalcore/blob/master/kcalcore/icalformat.cpp#L276
There is no API in KCalCore to create a minimal VTIMEZONE section and this library is shared by various projects, including KDE, so changing its API or its behaviour is not that simple.

All that being said, it could be interesting to propose a change there to only write the relevant transition rules, but it’s not that easy as stated before. In the meantime, I’m afraid there is no easy solution to the QRcode sharing issue.

Another possibility, would be to give all the times in UTC, like that no time zone will be generated. The sharing plugin may convert all times of the event into UTC and export ?

1 Like

This looks to me as if the “filter” has to be implemented in QR-Share plugin, from a pratical point of view. Thanks.

Just tested another time zone without DST and QR-Share produced a QR-code, but quite crowded. Switching to a DST zone, creating a new event makes QR-Share fail to render a QR-code. The one created in the time zone wo DST still produces a QR-code… (XA2, SFOS 4.0.1.48)