<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/feed-rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title>recurrence end date / fix off-by-one-day issue</title>
  <pubDate>Sat, 05 Jul 2008 20:07:09 -0400</pubDate>
  <link>http://bugs.horde.org/ticket/6377</link>
  <atom:link rel="self" type="application/rss+xml" title="recurrence end date / fix off-by-one-day issue" href="http://bugs.horde.org/ticket/6377/rss" />
  <description>recurrence end date / fix off-by-one-day issue</description>

  
  
  <item>
   <title>in kronolith/lib/Recurrence.php there were some marks pointi</title>
   <description>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-&gt;setRecurEnd(new Horde_Date($timestamp + 86400));
+            $this-&gt;setRecurEnd(new Horde_Date($timestamp + 86340));
             break;
         }

@@ -1352,10 +1350,7 @@
             $hash['range-type'] = 'number';
             $hash['range'] = $this-&gt;getRecurCount();
         } elseif ($this-&gt;hasRecurEnd()) {
-            // Fix of-by-one day.
             $date = $this-&gt;getRecurEnd();
-            $date-&gt;mday -= 1;
-            $date-&gt;correct();
             $hash['range-type'] = 'date';
             $hash['range'] = Kolab_Date::encodeDate($date-&gt;timestamp());
         } else {
</description>
   <pubDate>Wed, 05 Mar 2008 12:05:50 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t43403</link>
  </item>
  <item>
   <title>i guess this should also go into lib/Horde/Date/Recurrence.p</title>
   <description>i guess this should also go into lib/Horde/Date/Recurrence.php</description>
   <pubDate>Wed, 05 Mar 2008 12:46:07 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t43405</link>
  </item>
  <item>
   <title>Jan put those fixme comments in there, so I'm passing this o</title>
   <description>Jan put those fixme comments in there, so I'm passing this one to him. Thanks!</description>
   <pubDate>Wed, 05 Mar 2008 17:25:24 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t43413</link>
  </item>
  <item>
   <title>hi ,

gone through my bug report history. this actually a </title>
   <description>hi ,

gone through my bug report history. this actually a follow up of
http://bugs.horde.org/ticket/?id=6265

mike</description>
   <pubDate>Mon, 10 Mar 2008 14:46:31 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t43670</link>
  </item>
  <item>
   <title>Both Gunnar's original code and your fix didn't look correct</title>
   <description>Both Gunnar's original code and your fix didn't look correct to me, please try what I committed.</description>
   <pubDate>Sat, 17 May 2008 16:47:27 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t45327</link>
  </item>
  <item>
   <title>Ping?</title>
   <description>Ping?</description>
   <pubDate>Fri, 23 May 2008 15:17:21 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t45502</link>
  </item>
  <item>
   <title>Going to guess this is fixed for now.</title>
   <description>Going to guess this is fixed for now.</description>
   <pubDate>Sun, 25 May 2008 15:11:05 -0400</pubDate>
   <link>http://bugs.horde.org/ticket/6377#t45588</link>
  </item>
  

 </channel>
</rss>
