1.1 --- a/imiptools/period.py Sun Oct 25 21:06:02 2015 +0100
1.2 +++ b/imiptools/period.py Sun Oct 25 22:54:49 2015 +0100
1.3 @@ -590,7 +590,7 @@
1.4 def get_scale(periods, tzid, view_period=None):
1.5
1.6 """
1.7 - Return an ordered time scale from the given list of 'periods'.
1.8 + Return a time scale from the given list of 'periods'.
1.9
1.10 The given 'tzid' is used to make sure that the times are defined according
1.11 to the chosen time zone.
1.12 @@ -619,10 +619,10 @@
1.13 # Add a point and this event to the ending list.
1.14
1.15 end = to_timezone(p.get_end(), tzid)
1.16 - end = view_end and min(end, view_end) or end
1.17 - if not scale.has_key(end):
1.18 - scale[end] = [], []
1.19 - scale[end][1].append(p)
1.20 + if not view_end or end < view_end:
1.21 + if not scale.has_key(end):
1.22 + scale[end] = [], []
1.23 + scale[end][1].append(p)
1.24
1.25 return scale
1.26