fixed mktime bug

This commit is contained in:
aiju 2011-06-03 13:06:28 +02:00
parent 67daf453a7
commit 7a4e46d7ab

View file

@ -110,8 +110,8 @@ mktime(struct tm *t)
d = ptm->tm_hour; d = ptm->tm_hour;
ptm = localtime(&a); ptm = localtime(&a);
d -= ptm->tm_hour; d -= ptm->tm_hour;
if(d < 0) // if(d < 0)
d += 24; // d += 24;
if(t->tm_isdst == 0 && ptm->tm_isdst) if(t->tm_isdst == 0 && ptm->tm_isdst)
d--; d--;
if(t->tm_isdst > 0 && !ptm->tm_isdst) if(t->tm_isdst > 0 && !ptm->tm_isdst)