6.0.0-alpha10
5/21/25

[#7846] Sunbird displays recurring events one day short
Summary Sunbird displays recurring events one day short
Queue Kronolith
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester kou (at) gmx (dot) de
Created 01/14/2009 (5971 days ago)
Due
Updated 06/15/2010 (5454 days ago)
Assigned 06/17/2009 (5817 days ago)
Resolved 08/18/2009 (5755 days ago)
Milestone 2.3.2
Patch No

History
06/15/2010 02:23:35 PM Jan Schneider Comment #18 Reply to this comment
Not a patch for the code, a patch for the unit test, i.e. RecurrenceTest.php.
06/15/2010 12:47:49 PM michael (dot) groene (at) zew (dot) uni-hannover (dot) de Comment #17
New Attachment: Recurrence.patch Download
Reply to this comment
If you think the current behavior isn't correct, please provide a 
patch for a new unit test that demonstrates this.
My patch would look like this, to make it sync correctly with Lightning
06/15/2010 11:39:24 AM Jan Schneider Comment #16
Version ⇒ Git master
Reply to this comment
If you think the current behavior isn't correct, please provide a 
patch for a new unit test that demonstrates this.
06/11/2010 07:38:15 AM michael (dot) groene (at) zew (dot) uni-hannover (dot) de Comment #15 Reply to this comment
Sync doesn't work again. After upgrading to your current sourcecode, 
the Recurring Event is displayed one day too often, as before. But 
this time, you manually add one day to "UNTIL".
When I comment out that line, everything works fine with lightning.

So changing kronoliths' recurrence.php in line 1168ff to:
         if ($this->hasRecurEnd()) {
#            $recurEnd = new Horde_Date($this->recurEnd);
#            $recurEnd->mday++;
             $rrule .= ';UNTIL=' . $calendar->_exportDateTime($this->recurEnd);
         }

Works as expected again, leading me to the question, why you're adding 
an extra day to until.
08/18/2009 11:56:17 AM Jan Schneider State ⇒ Resolved
 
06/17/2009 08:20:38 PM Jan Schneider Comment #13
State ⇒ Assigned
Milestone ⇒ 2.3.2
Reply to this comment
Isn't it great when fixes are tested? No one noticed that this was 
only fixed in Horde_Date_Recurrence, but not in Kronolith_Recurrence.
04/20/2009 08:31:32 AM Jan Schneider State ⇒ Resolved
 
03/31/2009 11:08:18 AM Jan Schneider Comment #12
Assigned to Jan Schneider
Reply to this comment
Should be fixed now.
03/31/2009 09:55:41 AM Jan Schneider Comment #9 Reply to this comment
I think Sunbird and Outlook are wrong, because section 4.3.1 of RFC 2445 says:



    The UNTIL rule part defines a date-time value which bounds the

    recurrence rule in an inclusive manner. If the value specified by

    UNTIL is synchronized with the specified recurrence, this date or

    date-time becomes the last instance of the recurrence. If specified

    as a date-time value, then it MUST be specified in an UTC time

    format. If not present, and the COUNT rule part is also not present,

    the RRULE is considered to repeat forever.



I interpret this as a date specified in the UNTIL part is inclusive.



But since date-time values are allowed to and seem to work fine with 
both clients, I'm gonna use those.
03/30/2009 07:08:50 PM avo (at) trustsec (dot) de Comment #8 Reply to this comment
Can you try version 2.3.1?
I tried version 2.3.1 but the value of UNTIL is still output without 
the time. For example, Horde exports



DTSTART:20090414T070000Z

RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090417



instead of



DTSTART:20090414T070000Z

RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090417T070000Z



This is the code from toRRule20() in Recurrence.php that outputs the date:



         if ($this->hasRecurEnd()) {

               $rrule .= ';UNTIL=' . $calendar->_exportDate($this->recurEnd);

           }



As far as I can see the time in the final date should match the time 
from the event's start date.
03/30/2009 05:53:41 PM Jan Schneider Comment #7
State ⇒ Feedback
Reply to this comment
Can you try version 2.3.1?
03/30/2009 05:00:05 PM avo (at) trustsec (dot) de Comment #6 Reply to this comment
Hi,

[Show Quoted Text - 21 lines]
I use the following workaround for the time being:



--- Recurrence.php.orig 2008-09-05 19:13:08.000000000 +0200

+++ Recurrence.php      2009-03-30 18:42:00.000000000 +0200

@@ -1127,7 +1127,11 @@

          }



          if ($this->hasRecurEnd()) {

-            $rrule .= ';UNTIL=' . $calendar->_exportDate($this->recurEnd);

+            $until = new Horde_Date($this->recurEnd);

+            $until->hour = $this->start->hour;

+            $until->min = $this->start->min;

+            $until->sec = $this->start->sec;

+            $rrule .= ';UNTIL=' . $calendar->_exportDateTime($until);

          }

          if ($count = $this->getRecurCount()) {

              $rrule .= ';COUNT=' . $count;



BTW, the Spam protection is not usable in Firefox. The ASCII art 
letters aren't shown properly.
03/30/2009 04:12:47 PM avo (at) trustsec (dot) de Comment #5 Reply to this comment
The following event from my Horde calendar is one day short in 
Lightning as well as Outlook. The event starts on 14th April and is 
supposed to end on 17th April. In Lightning and Outlook the event ends 
on 16th April.



BEGIN:VEVENT

DTSTART:20090414T070000Z

DTEND:20090414T150000Z

DTSTAMP:20090330T145501Z

UID:20090330144131.43343swuo9izn6yo@www.example.com

CREATED:20090330T124131Z

LAST-MODIFIED:20090330T124430Z

SUMMARY:Foo

ORGANIZER;CN=Andreas Voegele:mailto:andreas@example.com

CATEGORIES:Bar

LOCATION:Baz

CLASS:PUBLIC

STATUS:CONFIRMED

TRANSP:OPAQUE

RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090417

END:VEVENT



If I edit the event in Lightning I get:



BEGIN:VEVENT

DTSTART:20090414T070000Z

DTEND:20090414T150000Z

DTSTAMP:20090330T155515Z

UID:20090330144131.43343swuo9izn6yo@www.example.com

CREATED:20090330T124131Z

LAST-MODIFIED:20090330T155526Z

SUMMARY:Foo

ORGANIZER;RSVP=FALSE;CN=Andreas Voegele:mailto:andreas@example.com

CATEGORIES:Bar

LOCATION:Baz

CLASS:PUBLIC

STATUS:CONFIRMED

TRANSP:OPAQUE

RRULE:FREQ=DAILY;UNTIL=20090417T070000Z;INTERVAL=1

X-MOZ-GENERATION:1

END:VEVENT
02/04/2009 10:16:12 PM kou (at) gmx (dot) de Comment #4 Reply to this comment
I just updated to 1.2.2 besides having many other new problems now the 
here reported problem still occurs in the same way.


01/24/2009 04:08:54 PM Chuck Hagenbuch State ⇒ No Feedback
 
01/14/2009 04:37:59 PM Jan Schneider Comment #3
Summary ⇒ Sunbird displays recurring events one day short
Reply to this comment
And please try a stable release version.
01/14/2009 04:03:38 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Please provide an iCalendar export of both versions of the event, for 
comparison.
01/14/2009 02:03:00 PM kou (at) gmx (dot) de Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Sunbird displays reoccuring events one day short.
Type ⇒ Bug
Queue ⇒ Kronolith
Reply to this comment
When I create an event that reoccurs every 1 week on Mo, Tu, We, Th, 
Fr till 01/30/08 from 08:00 till 19:00 the event will display one day 
short (till 01/29/08) in Sunbird.

If I edit the event in Subird reselect the 01/30/08 and save again the 
event will be displayed correctly in Sunbird and Kronolith.

When I then open the event in Kronolith again and just hit save, the 
event will be displayed again one day short in Sunbird.

Saved Queries