[Tutor] how do i get datetime object or time object from updated in rss
anil maran
anilmrn at yahoo.com
Thu Aug 3 08:56:11 CEST 2006
How do i convert this string to
datetime object
Fri, 21 Apr 2006 03:02:17 +0000
Previously I'd been using mxDateTime (which does everything but requires a C extension) to parse e-mail style dates (i.e. the ones used in RSS and changes.xml) but it looks like they're handled by the standard library.
http://blogs.law.harvard.edu/tech/rss
mx.DateTime.DateTimeFrom(d['entries'][1].updated)
Traceback (most recent call last):
File "<input>", line 1, in ?
File "/usr/lib/python2.4/site-packages/mx/DateTime/DateTime.py", line 226, in DateTimeFrom
value = float(arg)
ValueError: invalid literal for float(): Fri, 21 Apr 2006 03:02:17 +0000
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060802/af77942a/attachment.htm
More information about the Tutor
mailing list