fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
API: get changes since
[wolnelektury.git]
/
apps
/
api
/
helpers.py
diff --git a/apps/api/helpers.py
b/apps/api/helpers.py
new file mode 100644
(file)
index 0000000..
f01522a
--- /dev/null
+++ b/
apps/api/helpers.py
@@ -0,0
+1,8
@@
+# -*- coding: utf-8 -*-
+
+from time import mktime
+
+def timestamp(dtime):
+ "converts a datetime.datetime object to a timestamp with fractional part"
+ return mktime(dtime.timetuple()) + dtime.microsecond / 1000000.0
+