aa22465fc954bd8e7d8cf3ff02af29f42eafaa9d
[wolnelektury.git] / apps / api / helpers.py
1 # -*- coding: utf-8 -*-
2
3 from time import mktime
4
5 def timestamp(dtime):
6     "converts a datetime.datetime object to a timestamp int"
7     return int(mktime(dtime.timetuple()))
8