[tor-commits] [ooni-probe/master] Add library for date and time related activity

art at torproject.org art at torproject.org
Sat Jun 2 18:34:29 UTC 2012


commit 460d88ce95a4b759cd2284223829369059dfa535
Author: Arturo Filastò <hellais at torproject.org>
Date:   Thu May 31 21:15:51 2012 +0200

    Add library for date and time related activity
---
 ooni/date.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ooni/date.py b/ooni/date.py
new file mode 100644
index 0000000..6f83191
--- /dev/null
+++ b/ooni/date.py
@@ -0,0 +1,11 @@
+from datetime import datetime
+
+def pretty_date():
+    cur_time = datetime.utcnow()
+    d_format = "%d %B %Y %H:%M:%S"
+    pretty = cur_time.strftime(d_format)
+    return pretty
+
+def now():
+    return datetime.utcnow()
+





More information about the tor-commits mailing list