[tor-commits] [oonib/master] fix 'false midnight' bug (https://lwn.net/Articles/590299/ for an explanation)

art at torproject.org art at torproject.org
Wed Apr 23 14:31:51 UTC 2014


commit 443df222c023b4b737582037649a24460a2834d3
Author: Darius Bacon <darius at wry.me>
Date:   Fri Mar 28 10:49:40 2014 -0700

    fix 'false midnight' bug (https://lwn.net/Articles/590299/ for an explanation)
---
 oonib/otime.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oonib/otime.py b/oonib/otime.py
index 84758eb..e38089b 100644
--- a/oonib/otime.py
+++ b/oonib/otime.py
@@ -82,7 +82,7 @@ def timestamp(t=None):
         If not specified will default to the current time
         in UTC.
     """
-    if not t:
+    if t is None:
         t = datetime.utcnow()
     ISO8601 = "%Y-%m-%dT%H%M%SZ"
     return t.strftime(ISO8601)





More information about the tor-commits mailing list