[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit d7b6cb2a2d6e4ea1d206ec870635544ee22cd488
Author: Darius Bacon <darius@xxxxxx>
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)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits