Summary | recurrence end date / fix off-by-one-day issue |
Queue | Kronolith |
Queue Version | 2.2-RC2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | m.gabriel (at) das-netzwerkteam (dot) de |
Created | 03/05/2008 (6331 days ago) |
Due | |
Updated | 05/25/2008 (6250 days ago) |
Assigned | 05/17/2008 (6258 days ago) |
Resolved | 05/25/2008 (6250 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | 2.2 |
Patch | No |
State ⇒ Resolved
State ⇒ Feedback
please try what I committed.
gone through my bug report history. this actually a follow up of
http://bugs.horde.org/ticket/?id=6265
mike
Assigned to Jan Schneider
State ⇒ Assigned
State ⇒ Unconfirmed
New Attachment: kronolith-recurrence.patch
Queue ⇒ Kronolith
Summary ⇒ recurrence end date / fix off-by-one-day issue
Type ⇒ Bug
Priority ⇒ 1. Low
off-by-one-day issue.
reproduce it:
use the kolab driver.
create a (kolab) event (20th of march), define daily recurrence and
also define an end date for recurrence (30th of march). in kronolith
the last entry in the calendar will be on the 29th. recurrency ends on
the 30th march at 0:00am.
in kolab xml events you can obviously only store date-only hashes for
recur end date (not time component). at least, this is what the
new/XML kolab driver in horde does...
my fix for this issues does the following. it adds some hours and
minutes to the recur end date (23:59h) and then the last event of the
recurrence is displayed correctly.
--- a/kronolith/lib/Recurrence.php 2007-11-29 12:33:10.000000000 +0000
+++ b/kronolith/lib/Recurrence.php 2008-03-05 16:26:28.000000000 +0000
@@ -1156,10 +1156,8 @@
break;
case 'date':
- // fix off-by-one day
- //FIXME
$timestamp = Kolab_Date::decodeDate($hash['range']);
- $this->setRecurEnd(new Horde_Date($timestamp + 86400));
+ $this->setRecurEnd(new Horde_Date($timestamp + 86340));
break;
}
@@ -1352,10 +1350,7 @@
$hash['range-type'] = 'number';
$hash['range'] = $this->getRecurCount();
} elseif ($this->hasRecurEnd()) {
- // Fix of-by-one day.
$date = $this->getRecurEnd();
- $date->mday -= 1;
- $date->correct();
$hash['range-type'] = 'date';
$hash['range'] = Kolab_Date::encodeDate($date->timestamp());
} else {