Ask / Submit
6

Reminders of all-day events not working

asked 2017-10-12 23:12:43 +0200

birefringence gravatar image

updated 2017-10-23 21:50:55 +0200

Reminders of all-day events are not shown correctly under the following conditions:

  1. The event is created on another device and synced via CalDAV
  2. The reminder time is defined as a relative offset

So e.g. this works fine:

BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DATE-TIME:20171010T190000Z
DESCRIPTION:Default Mozilla Description
END:VALARM

It also works if the event is created on the device itself. But if it is created in e.g. Thunderbird with a relative offset

BEGIN:VALARM
ACTION:DISPLAY
TRIGGER;VALUE=DURATION:-PT12H
DESCRIPTION:Default Mozilla Description
X-KDE-KCALCORE-ENABLED:TRUE
END:VALARM

the alarm is not shown at the correct time (I would expect at noon of the previous day for the example above). Instead the event appears as a "missed reminder" notification some time after midnight (the exact time is difficult to determine for me, as I normally sleep then ;-) But I do see it when I wake up the next morning).

My current software version is SailfishOS 2.1.1.26 on Jolla 1.

Update:

I have now switched my primary usage to Sailfish X, which shows the same behavior.

Looking at /home/nemo/.timed/events.data I see that working alarms have an exact time attached to them:

{ key = "alarmtime", val = "2018-01-06T20:15:00+01:00" },

whereas the non-working ones only have date:

{ key = "APPLICATION", val = "libextendedkcal" },
{ key = "PLUGIN", val = "libCalendarReminder" },
{ key = "TITLE", val = "redacted" },
{ key = "alarmtime", val = "2017-11-16" },
{ key = "endDate", val = "2017-11-16" },

I believe that this is a regression since I faintly remember that this used to work quite some time ago.

edit retag flag offensive close delete

Comments

1

Thanks for the report, I've created https://bugs.merproject.org/show_bug.cgi?id=1836 to track the issue

chris.adams ( 2017-10-26 04:59:13 +0200 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2017-10-27 23:32:59 +0200

updated 2017-10-27 23:33:13 +0200

I've found the root of the bug, thanks to @birefringence clear investigation. The issue is due to the fact that when the time of the alarm is computed in Alarm::time(), it is using a KDateTime dt that is labelled dayOnly, because coming from a all day event. Then, it is specified in the KDE reference API that addSeconds() for dayOnly KDateTime is rounded to days. Thus the erroneous returned time that is later wrongly stored by timed.

I've submitted a MR upstream.

edit flag offensive delete publish link more

Comments

Great :-) Anything I can do to support this?

birefringence ( 2017-11-01 21:35:44 +0200 )edit

I'll discuss it on IRC during the CalDAV community meeting on Monday 6th at 9.00 UTC with Chris Adams. I cannot speak for him but I guess he might make a test package.

Damien Caliste ( 2017-11-01 21:59:05 +0200 )edit
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2017-10-12 23:12:43 +0200

Seen: 132 times

Last updated: Oct 27