From dev-return-21009-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Aug 27 03:01:03 2008 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 63733 invoked from network); 27 Aug 2008 03:01:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Aug 2008 03:01:02 -0000 Received: (qmail 52685 invoked by uid 500); 27 Aug 2008 03:01:00 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 52297 invoked by uid 500); 27 Aug 2008 03:00:59 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 52286 invoked by uid 99); 27 Aug 2008 03:00:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2008 20:00:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.97.132.74] (HELO spunkymail-a19.g.dreamhost.com) (208.97.132.74) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2008 03:00:01 +0000 Received: from [192.168.1.138] (c-24-6-247-144.hsd1.ca.comcast.net [24.6.247.144]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by spunkymail-a19.g.dreamhost.com (Postfix) with ESMTP id 424C212057; Tue, 26 Aug 2008 20:00:55 -0700 (PDT) Cc: dev@apr.apache.org Message-Id: From: Geoff Greer To: Gordon Henriksen In-Reply-To: <83775B4A-6F70-4859-B6F0-BCB7CEFF205A@me.com> Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Patch] RFC 822 date parsing Date: Tue, 26 Aug 2008 20:00:29 -0700 References: <70DC8F23-3BE4-40D7-AAD7-2D23D02E3F6F@mipsisrisc.com> <83775B4A-6F70-4859-B6F0-BCB7CEFF205A@me.com> X-Mailer: Apple Mail (2.926) X-Virus-Checked: Checked by ClamAV on apache.org apr_rfc822_date turns an apr_time_t into a string. I didn't see =20 apr_date_parse_rfc since it was in apr-util. Figures. I also invented this new device that will revolutionize transport. I =20 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 =20 > GMT ; RFC 822, updated by RFC 1123 > /usr/include/apr-1/apr_date.h: * Parses a string resembling an RFC =20 > 822 date. This is meant to be > /usr/include/apr-1/apr_date.h: * Sun, 06 Nov 1994 08:49:37 =20 > GMT ; RFC 822, updated by RFC 1123 > /usr/include/apr-1/apr_date.h: * Sun, 6 Nov 1994 08:49:37 =20 > GMT ; RFC 822, updated by RFC 1123 > /usr/include/apr-1/apr_date.h: * Sun, 06 Nov 94 08:49:37 =20 > GMT ; RFC 822 > /usr/include/apr-1/apr_date.h: * Sun, 6 Nov 94 08:49:37 =20 > 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 =20 > the RFC822 > /usr/include/apr-1/apr_time.h:APR_DECLARE(apr_status_t) =20 > apr_rfc822_date(char *date_str, apr_time_t t); > > =97 Gordon >