mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 09:59:01 +00:00
Prevent overflow when calculating timezones (#3730)
This commit is contained in:
parent
827bacdfc8
commit
dfcabba0b2
@ -223,7 +223,7 @@ int32_t getTZOffset()
|
|||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
gmt = gmtime(&now);
|
gmt = gmtime(&now);
|
||||||
gmt->tm_isdst = -1;
|
gmt->tm_isdst = -1;
|
||||||
return (int16_t)difftime(now, mktime(gmt));
|
return (int32_t)difftime(now, mktime(gmt));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user