1.1 --- a/imiptools/period.py Tue Feb 03 17:43:44 2015 +0100
1.2 +++ b/imiptools/period.py Tue Feb 03 18:19:59 2015 +0100
1.3 @@ -215,11 +215,12 @@
1.4
1.5 return slots
1.6
1.7 -def add_day_start_points(slots):
1.8 +def add_day_start_points(slots, tzid):
1.9
1.10 """
1.11 Introduce into the 'slots' any day start points required by multi-day
1.12 - periods.
1.13 + periods. The 'tzid' is required to make sure that appropriate time zones
1.14 + are chosen and not necessarily those provided by the existing time points.
1.15 """
1.16
1.17 new_slots = []
1.18 @@ -227,7 +228,7 @@
1.19 previously_active = []
1.20
1.21 for point, active in slots:
1.22 - start_of_day = get_start_of_day(point)
1.23 + start_of_day = get_start_of_day(point, tzid)
1.24 this_date = point.date()
1.25
1.26 # For each new day, add a slot for the start of the day where periods