X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=zotnet%2Ftws%2Fdtimep.lex;h=ab2e4f5132ca506cb6cc027948ba8eab2eaf672c;hp=467dc85d37d520e2858932942676d35a1452b3d2;hb=6a471c368b128394153c13c6d8f55cf0855f5779;hpb=7593f8f93951b6ca853a72bdbcd0a34dc741bc52 diff --git a/zotnet/tws/dtimep.lex b/zotnet/tws/dtimep.lex index 467dc85..ab2e4f5 100644 --- a/zotnet/tws/dtimep.lex +++ b/zotnet/tws/dtimep.lex @@ -257,6 +257,16 @@ dparsetime (char *str) for (i = 0; isdigit(*cp); ) i = i*10 + (*cp++ - '0'); tw.tw_year = i; +#ifdef FIX_NON_Y2K_COMPLIANT_MUA_DATES + /* handle broken mua's that don't add + 1900, or just use the last two + digits. Assume no email before + 1972. */ + if (tw.tw_year < 72) + tw.tw_year += 100; + if (tw.tw_year < 1900) + tw.tw_year += 1900; +#endif /* FIX_NON_Y2K_COMPLIANT_MUA_DATES */ } {D}"-"?{MONTH}({W}at)?{w} { tw.tw_mday = CVT1OR2;