求C语言读取cookie时间代码解决思路

求C语言读取cookie时间代码
cookie时间格式如下:
expires=Fri, 02-Aug-2013 09:09:01 GMT

如何将02-Aug-2013 09:09:01这部分读取出来存放到<time.h>定义的struct tm结构中,求高人指点~~~~

------解决方案--------------------
探讨

我看到有函数asctime()可以将日期和时间为相应的字符串,输出格式就是Fri, 02-Aug-2013 09:09:01 GMT这样的格式,有没有什么函数可以进行反向操作,将字符串转换回来?

------解决方案--------------------
C/C++ code
#include <time.h>
#include <stdio.h>

void main()
{
    struct tm  xmas = { 0, 0, 12, 25, 11, 93 };
    
    mktime( &xmas ) ;
    printf( "%s\n", asctime( &xmas ) );    
}

------解决方案--------------------
C/C++ code
#include <time.h>
#include <stdio.h>

void main()
{
    struct tm  xmas = { 0, 0, 12, 25, 11, 93 };
    
    mktime( &xmas ) ;
    printf( "time is: %s\n", asctime( &xmas ) );    

    char buf[50] = { 0 } ;
    strftime(buf, 50, "time is: %d-%b-%Y %H:%M:%S GTM \n", &xmas);
    printf(buf);
}

------解决方案--------------------
探讨

C/C++ code

#include <stdio.h>

void prt_msg(char *msg,unsigned int ulen)
{
for (unsigned int i = 0; i < ulen; i++) \

printf("%c", msg[i]); 

printf("\n");
}

int main()……

------解决方案--------------------
C/C++ code


sscanf(str_time,"%[^,], %2d-%[^-]-%4d %2d:%2d:%2d %s",week,&day,month,&year,&hour,&min,&sec,type);

------解决方案--------------------
探讨

谢谢,这个解决差不多了,还差最后一个问题,月份的取值为:
C/C++ code

static const char mon_name[12][3] = {
  "Jan", "Feb", "Mar", "Apr", "May", "Jun",
  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
  };


怎么将其转换成数字的形式,并且还要验证合法性?……