apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: apr-util/misc apr_date.c
Date Fri, 28 Mar 2003 18:19:30 GMT
jerenkrantz    2003/03/28 10:19:30

  Modified:    .        CHANGES
               misc     apr_date.c
  Log:
  Allow apr_date_parse_rfc to parse 'Sun, 06-Nov-1994 08:49:37 GMT' as a valid
  date.
  
  Submitted by:	Dmitri Tikhonov <dmitri@netilla.com>
  Reviewed by:	Justin Erenkrantz
  
  Revision  Changes    Path
  1.106     +3 -0      apr-util/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr-util/CHANGES,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -u -r1.105 -r1.106
  --- CHANGES	23 Mar 2003 03:32:57 -0000	1.105
  +++ CHANGES	28 Mar 2003 18:19:29 -0000	1.106
  @@ -1,5 +1,8 @@
   Changes with APR-util 0.9.3
   
  +  *) Allow apr_date_parse_rfc to parse 'Sun, 06-Nov-1994 08:49:37 GMT' as a
  +     valid date.  [Dmitri Tikhonov <dmitri@netilla.com>]
  +
     *) Fix error in apu-config when symlinks are involved.
        [Garrett Rooney <rooneg@electricjellyfish.net>]
   
  
  
  
  1.16      +19 -0     apr-util/misc/apr_date.c
  
  Index: apr_date.c
  ===================================================================
  RCS file: /home/cvs/apr-util/misc/apr_date.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -u -r1.15 -r1.16
  --- apr_date.c	1 Jan 2003 00:02:22 -0000	1.15
  +++ apr_date.c	28 Mar 2003 18:19:30 -0000	1.16
  @@ -341,6 +341,7 @@
    *     Sun, 06 Nov 94 8:49:37 GMT     ; Unknown [Elm 70.85]
    *     Sun, 6 Nov 94 8:49:37 GMT      ; Unknown [Elm 70.85] 
    *     Mon,  7 Jan 2002 07:21:22 GMT  ; Unknown [Postfix]
  + *     Sun, 06-Nov-1994 08:49:37 GMT  ; RFC 850 with four digit years
    *
    */
   
  @@ -563,6 +564,24 @@
           monstr = date + 3;
           timstr = date + 12;
           gmtstr = date + 20;
  +
  +        TIMEPARSE_STD(ds, timstr);
  +    }
  +    else if (apr_date_checkmask(date, "##-@$$-#### ##:##:## *")) {
  +       /* RFC 1123 with dashes instead of spaces between date/month/year
  +        * This also looks like RFC 850 with four digit years.
  +        */
  +        ds.tm_year = ((date[7] - '0') * 10 + (date[8] - '0') - 19) * 100;
  +        if (ds.tm_year < 0)
  +            return APR_DATE_BAD;
  +
  +        ds.tm_year += ((date[9] - '0') * 10) + (date[10] - '0');
  +
  +        ds.tm_mday = ((date[0] - '0') * 10) + (date[1] - '0');
  +
  +        monstr = date + 3;
  +        timstr = date + 12;
  +        gmtstr = date + 21;
   
           TIMEPARSE_STD(ds, timstr);
       }
  
  
  

Mime
View raw message