/[mailutils]/mailutils/mailbox/parse822.c
ViewVC logotype

Diff of /mailutils/mailbox/parse822.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23 by gray, Tue Aug 6 01:32:11 2002 UTC revision 1.24 by gray, Fri Aug 23 06:55:03 2002 UTC
# Line 1606  parse822_time (const char **p, const cha Line 1606  parse822_time (const char **p, const cha
1606            break;            break;
1607          }          }
1608    
1609        if (strspn (zp, "0123456789") != 4)        if (strspn (zp, "0123456789") == 4)
1610          {          {
           *p = save;  
           str_free (&zone);  
           return EPARSE;  
         }  
1611        /* convert to seconds from UTC */        /* convert to seconds from UTC */
1612        hh = (zone[1] - '0') * 10 + (zone[2] - '0');        hh = (zone[1] - '0') * 10 + (zone[2] - '0');
1613        mm = (zone[3] - '0') * 10 + (zone[4] - '0');        mm = (zone[3] - '0') * 10 + (zone[4] - '0');
1614            }
1615          else
1616            {
1617              hh = mm = 0; /* Consider equivalent to -0000 */
1618            }
1619        if (tz)        if (tz)
1620          *tz = sign * (hh * 60 * 60 + mm * 60);          *tz = sign * (hh * 60 * 60 + mm * 60);
1621      }      }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26