6.0.0-git
2019-03-18

[#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 2009-01-14 (3715 days ago)
Due
Updated 2010-06-15 (3198 days ago)
Assigned 2009-06-17 (3561 days ago)
Resolved 2009-08-18 (3499 days ago)
Milestone 2.3.2
Patch No

History
2010-06-15 14:23:35 Jan Schneider Comment #18 Reply to this comment
Not a patch for the code, a patch for the unit test, i.e. RecurrenceTest.php.
2010-06-15 12:47:49 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
2010-06-15 11:39:24 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.
2010-06-11 07:38:15 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.
2009-08-18 11:56:17 Jan Schneider State ⇒ Resolved
 
2009-06-17 20:20:38 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.
2009-04-20 08:31:32 Jan Schneider State ⇒ Resolved
 
2009-03-31 11:08:18 Jan Schneider Comment #12
Assigned to Jan Schneider
Reply to this comment
Should be fixed now.
2009-03-31 09:55:41 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.
2009-03-30 19:08:50 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.
2009-03-30 17:53:41 Jan Schneider Comment #7
State ⇒ Feedback
Reply to this comment
Can you try version 2.3.1?
2009-03-30 17:00:05 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.
2009-03-30 16:12:47 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
2009-02-04 22:16:12 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.


2009-01-24 16:08:54 Chuck Hagenbuch State ⇒ No Feedback
 
2009-01-14 16:37:59 Jan Schneider Comment #3
Summary ⇒ Sunbird displays recurring events one day short
Reply to this comment
And please try a stable release version.
2009-01-14 16:03:38 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
Please provide an iCalendar export of both versions of the event, for 
comparison.
2009-01-14 14:03:00 kou (at) gmx (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Sunbird displays reoccuring events one day short.
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
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