Prevent overflow when calculating timezones (#3730)
This commit is contained in:
1 parent
827bacdfc8
commit
dfcabba0b2
1 file changed
+1
-1
+1
-1
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user