Prevent overflow when calculating timezones (#3730)

This commit is contained in:
todd-herbert 2024-04-27 13:43:09 +12:00 committed by GitHub
parent 827bacdfc8
commit dfcabba0b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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));
}
/**