apr_rfc822_date turns an apr_time_t into a string. I didn't see apr_date_parse_rfc since it was in apr-util. Figures.

I also invented this new device that will revolutionize transport. I call it the wheel...

Geoff

On Aug 26, 2008, at 7:37 PM, Gordon Henriksen wrote:

On 2008-08-26, at 22:23, Geoff Greer wrote:

APR doesn't have any function for parsing an RFC 822 date.

Seems it already has two.

$ grep -ri 'RFC.*822' /usr/include/apr-1
/usr/include/apr-1/apr_date.h: * Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 /usr/include/apr-1/apr_date.h: * Parses a string resembling an RFC 822 date. This is meant to be /usr/include/apr-1/apr_date.h: * Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 /usr/include/apr-1/apr_date.h: * Sun, 6 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 /usr/include/apr-1/apr_date.h: * Sun, 06 Nov 94 08:49:37 GMT ; RFC 822 /usr/include/apr-1/apr_date.h: * Sun, 6 Nov 94 08:49:37 GMT ; RFC 822
/usr/include/apr-1/apr_time.h:/** length of a RFC822 Date */
/usr/include/apr-1/apr_time.h:#define APR_RFC822_DATE_LEN (30)
/usr/include/apr-1/apr_time.h: * apr_rfc822_date formats dates in the RFC822 /usr/include/apr-1/apr_time.h:APR_DECLARE(apr_status_t) apr_rfc822_date(char *date_str, apr_time_t t);

— Gordon


Reply via email to