# HG changeset patch # User Sylvain Thénault # Date 1276171012 -7200 # Node ID 1c17e47df97471627c78a3ac1c03d659f3b558c1 # Parent 5606c01d68b2016cf7ed7b414f060ef9258e0685 [req] fix format_time w/ 0:0 which is evaluated to False diff -r 5606c01d68b2 -r 1c17e47df974 req.py --- a/req.py Thu Jun 10 12:53:21 2010 +0200 +++ b/req.py Thu Jun 10 13:56:52 2010 +0200 @@ -317,7 +317,7 @@ """return a string for a date time according to instance's configuration """ - if date: + if date is not None: if date_format is None: if time: date_format = self.property_value('ui.datetime-format') @@ -330,7 +330,7 @@ """return a string for a time according to instance's configuration """ - if time: + if time is not None: return ustrftime(time, self.property_value('ui.time-format')) return u''