[Tickets #7035] Re: listing alarms of recurring events which cross a day boundary
bugs at horde.org
bugs at horde.org
Mon Jul 7 06:46:32 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7035
------------------------------------------------------------------------------
Ticket | 7035
Updated By | develop at kristov.de
Summary | listing alarms of recurring events which cross a day
| boundary
Queue | Kronolith
Version | 2.2
Type | Bug
State | Feedback
Priority | 2. Medium
Milestone |
Patch | 1
Owners |
------------------------------------------------------------------------------
develop at kristov.de (2008-07-07 02:46) wrote:
> 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.
More information about the bugs
mailing list