8 lines
143 B
Python
8 lines
143 B
Python
import datetime
|
|
|
|
|
|
def unix_time(dt):
|
|
epoch = datetime.datetime.utcfromtimestamp(0)
|
|
delta = dt - epoch
|
|
return delta.total_seconds()
|