moto/moto/dynamodb/utils.py
2013-03-15 00:45:12 -04:00

8 lines
143 B
Python

import datetime
def unix_time(dt):
epoch = datetime.datetime.utcfromtimestamp(0)
delta = dt - epoch
return delta.total_seconds()