From dfcabba0b2bda6b142108962053c7c36263dcaf3 Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Sat, 27 Apr 2024 13:43:09 +1200 Subject: [PATCH] Prevent overflow when calculating timezones (#3730) --- src/gps/RTC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gps/RTC.cpp b/src/gps/RTC.cpp index 85931900f..a2cdb5b30 100644 --- a/src/gps/RTC.cpp +++ b/src/gps/RTC.cpp @@ -223,7 +223,7 @@ int32_t getTZOffset() now = time(NULL); gmt = gmtime(&now); gmt->tm_isdst = -1; - return (int16_t)difftime(now, mktime(gmt)); + return (int32_t)difftime(now, mktime(gmt)); } /**