6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
3/25/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#6377] recurrence end date / fix off-by-one-day issue
*
Your Email Address
*
Spam protection
Enter the letters below:
._.._..__ \ /.___. | | | \ >< _/ _|__|_|__// \./__.
Comment
> in kronolith/lib/Recurrence.php there were some marks pointing at an > 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 { > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers