Author eka
Recipients eka
Date 2009-08-04.14:04:35
SpamBayes Score 8.91528e-06
Marked as misclassified No
Message-id <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za>
In-reply-to
Content
When trying to use datetime.strptime %z directive got an unexpected error.

>>> from datetime import datetime
>>> 
>>> fecha = u'Sun Aug 02 19:01:25 +0000 2009'
>>> datetime.strptime(fecha, '%a %b %d %H:%M:%S %z %Y')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/_strptime.py", line 317, in _strptime
    (bad_directive, format))
ValueError: 'z' is a bad directive in format '%a %b %d %H:%M:%S %z %Y'
History
Date User Action Args
2009-08-04 14:04:37ekasetrecipients: + eka
2009-08-04 14:04:37ekasetmessageid: <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za>
2009-08-04 14:04:36ekalinkissue6641 messages
2009-08-04 14:04:35ekacreate