--- util.cc.orig Mon Feb 9 07:48:44 1998 +++ util.cc Mon Mar 30 16:34:29 1998 @@ -156,11 +156,13 @@ time_t t; int i; char tmpstr[80]; -char *p1=NULL,*p2=NULL,*p3=NULL,*p4=NULL,*p5=NULL; -struct tm ttm={0,0,0,0,0,70,0,0,0}; - +char *ptmp,*p1=NULL,*p2=NULL,*p3=NULL,*p4=NULL,*p5=NULL; +struct tm ttm; +memset((char*)&ttm,0,sizeof(ttm)); strncpy(tmpstr,s,80); tmpstr[79]=0; +ptmp=strchr(tmpstr,';'); +if(ptmp) *ptmp=0; p1=strchr(tmpstr,','); if(p1){ *p1=0; @@ -172,10 +174,14 @@ p2++; } p3=strchr(p1,'-'); + ptmp=strchr(p1,' '); + if(ptmp&&(!p3||p3>ptmp)) p3=ptmp; if(p3){ *p3=0; p3++; p4=strchr(p3,'-'); + ptmp=strchr(p3,' '); + if(ptmp&&(!p4||p4>ptmp)) p4=ptmp; if(p4){ *p4=0; p4++; @@ -199,13 +205,13 @@ } } if(i==13){ - ttm.tm_isdst=0; + ttm.tm_isdst=-1; t=mktime(&ttm); #ifdef GLOBAL_TIMEZONE t-=timezone; #else #ifdef TM_GMTOFF_PRESENT - t-=localtime(&t)->tm_gmtoff; + t+=localtime(&t)->tm_gmtoff; #endif #endif return t;