Skip to content

Commit 308020d

Browse files
committed
Fix timezone creation on Windows
Windows returns the bias in minutes, but CoreFoundation expects the offset in seconds.
1 parent fff2489 commit 308020d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CoreFoundation/NumberDate.subproj/CFTimeZone.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static void __CFTimeZoneGetOffset(CFStringRef timezone, int32_t *offset) {
182182

183183
cbData = sizeof(tziInfo);
184184
if (RegQueryValueExW(hKey, L"TZI", NULL, NULL, (LPBYTE)&tziInfo, &cbData) == ERROR_SUCCESS)
185-
*offset = tziInfo.Bias;
185+
*offset = tziInfo.Bias * 60; // Bias is in minutes, CF uses seconds for its offset
186186

187187
RegCloseKey(hKey);
188188
}

0 commit comments

Comments
 (0)