[SYSSETUP] Fix timezone setup in the unattended install of ReactOS. Spotted and fixed by V. CORE-9648

svn path=/trunk/; revision=67516
This commit is contained in:
Amine Khaldi 2015-05-02 19:48:26 +00:00
parent a4675648df
commit e242dc3f08

View file

@ -1219,6 +1219,10 @@ GetTimeZoneListIndex(LPDWORD lpIndex)
BOOL bFound = FALSE;
unsigned long iLanguageID;
if (*lpIndex == -1)
{
*lpIndex = 85; /* fallback to GMT time zone */
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
L"SYSTEM\\CurrentControlSet\\Control\\NLS\\Language",
0,
@ -1240,6 +1244,11 @@ GetTimeZoneListIndex(LPDWORD lpIndex)
iLanguageID = wcstoul(szLanguageIdString, NULL, 16);
RegCloseKey(hKey);
}
else
{
iLanguageID = *lpIndex;
}
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
@ -1515,7 +1524,7 @@ DateTimePageDlgProc(HWND hwndDlg,
else
{
ShowTimeZoneList(GetDlgItem(hwndDlg, IDC_TIMEZONELIST),
SetupData, 85 /* GMT time zone */);
SetupData, -1);
SendDlgItemMessage(hwndDlg, IDC_AUTODAYLIGHT, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
}