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

2 Jun
2012
2 Jun
'12
6:34 p.m.
commit 460d88ce95a4b759cd2284223829369059dfa535 Author: Arturo Filastò <hellais@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() +
4779
Age (days ago)
4779
Last active (days ago)
0 comments
1 participants
participants (1)
-
art@torproject.org