We could run through the transition times from future to past (rather than from past to future as is done now); this doesn't solve the deep problem, but does get the "TZ=Europe/Paris 1996-01-01 00:00:00 tm_isdt=1" case right. It does have the advantage of being a fairly minimal change to the code. --ado *************** *** 1458,1467 **** if (sp == NULL) return WRONG; #endif /* defined ALL_STATE */ ! for (samei = 0; samei < sp->typecnt; ++samei) { if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) continue; ! for (otheri = 0; otheri < sp->typecnt; ++otheri) { if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) continue; tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - --- 1458,1467 ---- if (sp == NULL) return WRONG; #endif /* defined ALL_STATE */ ! for (samei = sp->typecnt - 1; samei >= 0; --samei) { if (sp->ttis[samei].tt_isdst != tmp->tm_isdst) continue; ! for (otheri = sp->typecnt - 1; otheri >= 0; --otheri) { if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst) continue; tmp->tm_sec += sp->ttis[otheri].tt_gmtoff -