Explicitely set tm_isdst to 0 before calling timegm. Coverity CID 12591.
This commit is contained in:
parent
430c005666
commit
4633ea3bc8
@ -1804,6 +1804,7 @@ time_t iso_datetime_read_7(const uint8_t *buf)
|
|||||||
tm.tm_hour = buf[3];
|
tm.tm_hour = buf[3];
|
||||||
tm.tm_min = buf[4];
|
tm.tm_min = buf[4];
|
||||||
tm.tm_sec = buf[5];
|
tm.tm_sec = buf[5];
|
||||||
|
tm.tm_isdst = 0;
|
||||||
|
|
||||||
return timegm(&tm) - ((int8_t)buf[6]) * 60 * 15;
|
return timegm(&tm) - ((int8_t)buf[6]) * 60 * 15;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user