# HG changeset patch # User Paul Boddie # Date 1431815978 -7200 # Node ID b3436119bd30eb9555b2e3bccfdbed3f96a4fea4 # Parent 7cd2088ea85d9bed0353fa720352bda1cab56d45 Fixed period start and end method usage. diff -r 7cd2088ea85d -r b3436119bd30 imiptools/period.py --- a/imiptools/period.py Sun May 17 00:14:36 2015 +0200 +++ b/imiptools/period.py Sun May 17 00:39:38 2015 +0200 @@ -301,15 +301,17 @@ # Add a point and this event to the starting list. - if not scale.has_key(p.get_start(tzid)): - scale[p.get_start(tzid)] = [], [] - scale[p.get_start(tzid)][0].append(p) + start = to_timezone(p.get_start(), tzid) + if not scale.has_key(start): + scale[start] = [], [] + scale[start][0].append(p) # Add a point and this event to the ending list. - if not scale.has_key(p.get_end(tzid)): - scale[p.get_end(tzid)] = [], [] - scale[p.get_end(tzid)][1].append(p) + end = to_timezone(p.get_end(), tzid) + if not scale.has_key(end): + scale[end] = [], [] + scale[end][1].append(p) return scale