Prevent overflow when calculating timezones (#3730)

This commit is contained in:
todd-herbert
2024-04-26 20:43:09 -05:00
committed by GitHub
co-authored by GitHub
parent 827bacdfc8
commit dfcabba0b2
+1 -1
View File
@@ -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));
}
/**