Get total seconds since January 1, 1970
import datetime t = datetime.datetime(2018, 11, 22, 1, 1) print("Date time", t) print("Seconds", t.timestamp())
Date time 2018-11-22 01:01:00 Seconds 1542828660.0
Comment here