Looking at this answer I can get the RFC 3339 based time fairly easily as the code for it shows:
d = datetime.datetime.utcnow() # <-- get time in UTC
print d.isoformat("T") + "Z"
I am wondering how I would get the same format of time, but for exactly one day ago. It would essentially be day-1
, however I am not sure how to do this.