6.0.0-beta1
7/5/25

[#6377] recurrence end date / fix off-by-one-day issue
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

History
05/25/2008 07:11:05 PM Chuck Hagenbuch Comment #7
State ⇒ Resolved
Reply to this comment
Going to guess this is fixed for now.
05/23/2008 07:17:21 PM Chuck Hagenbuch Comment #6 Reply to this comment
Ping?
05/17/2008 08:47:27 PM Jan Schneider Comment #5
State ⇒ Feedback
Reply to this comment
Both Gunnar's original code and your fix didn't look correct to me, 
please try what I committed.
03/10/2008 06:46:31 PM m (dot) gabriel (at) das-netzwerkteam (dot) de Comment #4 Reply to this comment
hi ,



gone through my bug report history. this actually a follow up of

http://bugs.horde.org/ticket/?id=6265



mike
03/06/2008 10:39:40 AM Jan Schneider Milestone ⇒ 2.2
 
03/05/2008 10:25:24 PM Chuck Hagenbuch Comment #3
Assigned to Jan Schneider
State ⇒ Assigned
Reply to this comment
Jan put those fixme comments in there, so I'm passing this one to him. Thanks!
03/05/2008 05:46:07 PM m (dot) gabriel (at) das-netzwerkteam (dot) de Comment #2 Reply to this comment
i guess this should also go into lib/Horde/Date/Recurrence.php
03/05/2008 05:05:50 PM m (dot) gabriel (at) das-netzwerkteam (dot) de Comment #1
State ⇒ Unconfirmed
New Attachment: kronolith-recurrence.patch Download
Queue ⇒ Kronolith
Summary ⇒ recurrence end date / fix off-by-one-day issue
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this 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 {


Saved Queries