This gets me a string. How do I go back to a datetime object so I can do some date arithmetic and such?
from datetime import datetime, timezone
s = datetime.now(timezone.utc).astimezone().isoformat()
This code snippet produces a string that I am happy with, but how do I get back to datetime
?
2015-11-01T07:49:35.106745-08:00