py datetime.date get unix

83

py datetime.date get unix -

import time
import datetime
d = datetime.date(2015,1,5)

unixtime = time.mktime(d.timetuple())
# 1420412400.0 (float)

Comments

Submit
0 Comments