# HG changeset patch # User Paul Boddie # Date 1422630805 -3600 # Node ID 464a0f3f82754c37f8b45e04ffb985891271c65a # Parent 9e3d700236912f74745674dd82339611bfc2f84b Introduce start-of-day time points unconditionally, so that events can be added before others on any given day. diff -r 9e3d70023691 -r 464a0f3f8275 imiptools/period.py --- a/imiptools/period.py Fri Jan 30 13:30:57 2015 +0100 +++ b/imiptools/period.py Fri Jan 30 16:13:25 2015 +0100 @@ -199,7 +199,7 @@ new_slots = [] current_date = None - previously_active = None + previously_active = [] for point, active in slots: start_of_day = get_start_of_day(point) @@ -213,7 +213,7 @@ # Add any continuing periods. - if point != start_of_day and previously_active: + if point != start_of_day: new_slots.append((start_of_day, previously_active)) # Add the currently active periods at this point in time.