Re: [Tutor] Formatting questions regarding datetime.isoformat()

2012-09-06 Thread eryksun
On Thu, Sep 6, 2012 at 3:50 AM, Dave Angel wrote: > On 09/06/2012 03:35 AM, eryksun wrote: >> >> Or you could use datetime.now(dateutil.tz.tzutc()) for a UTC tzinfo. >> It doesn't matter if you're only interested in the timedelta. > > Actually, it can matter. Whenever possible, produce all times

Re: [Tutor] Formatting questions regarding datetime.isoformat()

2012-09-06 Thread Peter Otten
staticsafe wrote: > Hello, > > 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 ai

Re: [Tutor] Formatting questions regarding datetime.isoformat()

2012-09-06 Thread eryksun
On Wed, Sep 5, 2012 at 11:00 PM, staticsafe wrote: > > In [68]: showinfo['RFC3339'] > Out[68]: '2012-09-10T21:00:00-4:00' You can parse the ISO format using the dateutil module: http://labix.org/python-dateutil >>> from dateutil.parser import parse >>> show_time = parse('2012-09-10T21:0

[Tutor] Formatting questions regarding datetime.isoformat()

2012-09-05 Thread staticsafe
Hello, 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 writ