[#7035] listing alarms of recurring events which cross a day boundary
Summary listing alarms of recurring events which cross a day boundary
Queue Kronolith
Queue Version 2.2
Type Bug
State Resolved
Priority 2. Medium
Owners Jan Schneider <jan (at) horde (dot) org>
Requester develop (at) kristov (dot) de
Created 07/06/2008 (137 days ago)
Due
Updated 08/20/2008 (92 days ago)
Assigned 07/13/2008 (130 days ago)
Resolved 08/20/2008 (92 days ago)
Attachments
Milestone 2.2.1
Patch Yes

History
08/20/2008 Jan Schneider Deleted Attachment: horde-kronolith-2.2-endofevent.patch
 
08/20/2008 Jan Schneider Comment #6
State ⇒ Resolved
Taken from Horde DevelopersHorde Developers
Reply to this comment
Fixed in CVS.
08/20/2008 CVS Commit Comment #5 Reply to this comment
07/30/2008 Jan Schneider Comment #4 Reply to this comment
The fix is almost correct, but it doesn't consider DST switched during 
the event.
07/13/2008 Jan Schneider Milestone ⇒ 2.2.1
State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
Assigned to Jan Schneider
 
07/07/2008 develop (at) kristov (dot) de Comment #3 Reply to this comment
Please provide a test case to reproduce this.
Suppose you have a recurring event each Monday, 16:00 to the following 
Tuesday, 12:00 with an alarm of 15 minutes before start. Let's assume 
it is Monday, 2008-07-07, 15:45, stored in $date. Then the old code

$start = new Horde_Date($next);
$start->min -= $event->getAlarm();
$start->correct();
$end = new Horde_Date(array(
   'year' => $next->year,
   'month' => $next->month,
   'mday' => $next->mday,
   'hour' => $event->end->hour,
   'min' => $event->end->min,
   'sec' => $event->end->sec));

assigns "2008-07-07 15:45" to $start and "2008-07-07 12:00" to $end. 
Now the second part of the following comparison

if ($start->compareDateTime($date) <= 0
   &&  $date->compareDateTime($end) <= -1)

fails, as $date ("2008-07-07 15:45") does not come before $end 
("2008-07-07 12:00"). The patch fixes this by assigning the correct 
event end "2008-07-08 12:00" to $end.

07/06/2008 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Please provide a test case to reproduce this.
07/06/2008 develop (at) kristov (dot) de Comment #1
New Attachment: horde-kronolith-2.2-endofevent.patch
Patch ⇒ 1
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ listing alarms of recurring events which cross a day boundary
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
The function mentioned above does not handle recurring events 
correctly which cross a day boundary. The patch attached fixes this.