fixed mktime bug
This commit is contained in:
parent
67daf453a7
commit
7a4e46d7ab
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue