<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<PRE>>>>><I> Page 20 of RFC2616 (HTTP) describes the format(s) for the time
</I>>>>><I> header. It wouldn't be too difficult for me to code up a solution
</I>>>>><I> for the 3 standard formats, but what get's me is the little note
</I>>>>><I> about how some servers may still send badly format time headers. :(
</I>>>>><I> So, I'm curious if this has already been done in the standard Python
</I>>>>><I> library?
</I>>>><I>
</I>>>><I> The parsedate() function in the rfc822 module does this and claims to
</I>>>><I> be tolerant of slightly malformed dates, but that module is
</I>>>><I> deprecated
</I>>>><I> as of Python 2.5 in favor of the email module which hopefully has an
</I>>>><I> equivalent function.
</I>>><I> Thanks, I'll give 'em a look. :)
</I>> Sorry, my mistake -- 2616 != 2822. I'm not sure if there's something
> in the standard library for parsing RFC 2616 dates.
>
> When I faced the problem of parsing HTTP dates, I wrote my own
> function although this was in an application that was deliberately
> unforgiving of invalid input and therefore my code makes no allowances
> for it. FWIW, it parsed over 1 million dates without encountering any
> that raised an error.
>
> Here it is, written in a time when I obviously didn't have total
> respect for PEP 8.
</PRE><PRE>That's exactly what I had in mind when I said, I could write one quickly. :) I guess I can always do it that way if the email.util one doesn't work right. :)</PRE><PRE>Thanks,</PRE><PRE>Kevin</PRE> <br /><hr />Hotmail: Trusted email with Microsoft's powerful SPAM protection. <a href='http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/
' target='_new'>Sign up now.</a></body>
</html>