Menu

#150 getConsumedTime method possible bug

Release
open-invalid
General (64)
5
2012-07-09
2012-06-21
bhav
No

the following is the event:
BEGIN:VEVENT
UID:77d04ff0-3023-46ad-9e0f-d5f84fe3981e
RRULE:FREQ=DAILY;INTERVAL=1;COUNT=2
SUMMARY:two day recurring overlapping event
ORGANIZER;CN=raghuveer kodati:mailto:raghuveer_kodati@yahoo.com
DTSTART;TZID="Etc/GMT":20120624T000000
DTEND;TZID="Etc/GMT":20120625T010000
STATUS:CONFIRMED
CLASS:PUBLIC
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
X-MICROSOFT-DISALLOW-COUNTER:TRUE
DTSTAMP:20120620T141150Z
SEQUENCE:0
END:VEVENT

the following is the code searching for the time consumed by the above event:
PeriodList p;
p = event.getConsumedTime(fromP, toP,true);

getConsumedTime returns p as "20120624T000000/20120626T010000" indicating that it is three day event from 2012/06/24 to 2012/06/26 when it is a two day recurring event with a one day overlap.

how can I find out the recurring events in this case ?

Thanks
bhav

Discussion

  • Ben Fortuna

    Ben Fortuna - 2012-06-26

    Hi bhav,

    Apologies for the delay, I just had a quick look and noticed that you have a DTSTART at midnight on 24/6, with the DTEND at 10am on 25/6. This means your event elapsed time is 1 day + 10 hours. This would explain why 2 recurrences consume 3 days, as the second occurrence runs from 25/6 to 26/6.

    Hope this clarifies the issue, let me know if you have any further queries.

    regards,
    ben

     
  • Ben Fortuna

    Ben Fortuna - 2012-06-26
    • labels: 653842 --> General
    • status: open --> pending-invalid
     
  • bhav

    bhav - 2012-06-26

    hey fortuna,
    No worries
    The problem is not that the recurrence consumes 3 days but the problem is that getConsumedTime is returning only one period from the 24th to the 26th, instead of sending a period list containing periods 24th to 25th and 25th to 26th.
    Thanks for your time
    bhav

     
  • Ben Fortuna

    Ben Fortuna - 2012-07-08

    Bhav,

    All periods are normalised (i.e. duplicates removed and overlaps concatenated) for getConsumedTime() as it is representing the total consumed time, and is not specific to individual recurrences.

    regards,
    ben

     
  • bhav

    bhav - 2012-07-09

    hi ben,
    I was wondering if theres any parameter I can pass to avoid the concatenating the overlaps or someway to find out the time consumed by each recurrence ?
    Thanks
    Bhav

     
  • bhav

    bhav - 2012-07-09
    • status: pending-invalid --> open-invalid
     

Log in to post a comment.