From 68163d1a167e493744b617045205ee301943d340 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com> Date: Sun, 24 Jul 2011 18:42:46 +0200 Subject: fixed time comparison. diff --git a/program/templatetags/timeslots.py b/program/templatetags/timeslots.py index 9b83a80..902de36 100644 --- a/program/templatetags/timeslots.py +++ b/program/templatetags/timeslots.py @@ -15,7 +15,7 @@ def duration_until(end): @register.simple_tag def duration_since(start): - if start.time()<time(0,0): + if start.time() < time(23,59): end = datetime.combine(start.date()+timedelta(days=1), time(6,0)) else: end = datetime.combine(start.date(), time(6,0)) -- cgit v0.10.2