Changeset 3277

Show
Ignore:
Timestamp:
04/17/08 09:04:39 (3 months ago)
Author:
swolter
Message:

Fixed bug #728 which concerned exception event numbering.
The offset 'past_events' computed now is the number of past
events of the current rule (not considering exceptions),
which need to be considered to arrive at the correct event
number for exceptions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/moto-sync/motosync.py

    r3276 r3277  
    565565    now = datetime.now(dateutil.tz.tzutc()) 
    566566    all_occurrences = ruleset.between(now, now + RRULE_FUTURE) 
     567    past_events = len(ruleset.between(eventdt, now, True)) 
    567568 
    568569    # add in the exception dates and rules (if any) 
     
    584585    for num in range(len(all_occurrences)): 
    585586        if all_occurrences[num] not in excepted_occurrences: 
    586             ret['exceptions'].append(num
     587            ret['exceptions'].append(num + past_events
    587588 
    588589    return ret