today = datetime.date.today()

today - datetime.timedelta(days=90)

time.time()/60/60/24
In [2]: time.strftime("%Y-%m-%d", time.localtime())
Out[2]: '2019-04-18'

In [3]: time.strptime("2019-02-02", "%Y-%m-%d")
Out[3]: time.struct_time(tm_year=2019, tm_mon=2, tm_mday=2, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=33, tm_isdst=-1)

In [4]: time.time()
Out[4]: 1555583321.1598809

In [5]: time.mktime(time.strptime("2019-02-02", "%Y-%m-%d"))
Out[5]: 1549036800.0