[Tutor] Formatting questions regarding datetime.isoformat()
me at staticsafe.ca
Thu Sep 6 05:00:15 CEST 2012
I am running Python 2.6.6 on a Debian Squeeze system. I am using two
modules in this bit of code - datetime and python-tvrage (available on
pypy here: http://pypi.python.org/pypi/python-tvrage/).
My goal is to find the time remaining until a certain show airs. Here is
some code I have written so far:
from tvrage import quickinfo
from datetime import tzinfo, timedelta, datetime
showinfo = quickinfo.fetch("Warehouse 13")
nextairdate = showinfo['RFC3369']
now = datetime.now().isoformat()
Now for my question/problem.
In : showinfo['RFC3339']
In : datetime.now().isoformat()
isoformat() is in a different format than the value returned by the API.
My question is how would one format both values so that I can perform a
timedelta on them as is the purpose of my code?
I hope I have provided the right amount of detail for my question.
More information about the Tutor