diff --git a/src/util.c b/src/util.c index e7efd02..0eeaede 100644 --- a/src/util.c +++ b/src/util.c @@ -1039,7 +1039,7 @@ time_t iso_datetime_read_7(const uint8_t *buf) tm.tm_hour = buf[3]; tm.tm_min = buf[4]; tm.tm_sec = buf[5]; - return timegm(&tm) - buf[6] * 60 * 15; + return timegm(&tm) - ((int8_t)buf[6]) * 60 * 15; } time_t iso_datetime_read_17(const uint8_t *buf)