+ osip_header_t *date=NULL;
+ struct tm ret={};
+ char tmp1[80]={0};
+ char tmp2[80]={0};
+ int i,j;
+
+ osip_message_get_date(ev->request,0,&date);
+ if(date==NULL){
+ ms_error("Could not get the date of message");
+ return;
+ }
+ sscanf(date->hvalue,"%3c,%d%s%d%d:%d:%d",tmp1,&ret.tm_mday,tmp2,
+ &ret.tm_year,&ret.tm_hour,&ret.tm_min,&ret.tm_sec);
+ ret.tm_year-=1900;
+ for(i=0;i<7;i++) {
+ if(strcmp(tmp1,days[i])==0) ret.tm_wday=i;
+ }
+ for(j=0;j<12;j++) {
+ if(strcmp(tmp2,months[j])==0) ret.tm_mon=j;
+ }