# HG changeset patch # User Paul Boddie # Date 1431880560 -7200 # Node ID e3a54eaec0ef85bf5ef8fee987153afbb17e9ded # Parent 1862b87ce6dc8d7b8270e159743c189d4bae3d4f Handle datetimes in different time zones when checking whether they end on the same day. diff -r 1862b87ce6dc -r e3a54eaec0ef imiptools/dates.py --- a/imiptools/dates.py Sun May 17 18:09:09 2015 +0200 +++ b/imiptools/dates.py Sun May 17 18:36:00 2015 +0200 @@ -366,7 +366,7 @@ """ return ( - dt.date() == end.date() or + to_timezone(dt, tzid).date() == to_timezone(end, tzid).date() or end == get_end_of_day(dt, tzid) )