strptime and date format strings
Roy Katz
katz at Glue.umd.edu
Sun Aug 13 15:34:12 EDT 2000
Hi!
I was wondering if anyone had a solution for detecting a date format
reported by an HTTP header and converting it to a standard time float?
I believe I may have seen this once; when I write a program that retrieves
the last-modified header from URLs, not all servers report the date in the
same format. Why hasn't this been ackowledged in urllib's design?
I believe that one must detect the date format somehow and then supply
the correct format to strptime(). Alas, if there were only such a
one-size-fits-all function which would just take a string and give you
back the time.
Roey Katz
president
Programmers with Heart Attacks
More information about the Python-list
mailing list