summaryrefslogtreecommitdiff
path: root/worldtime_protocol/timezone.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-05 01:28:37 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-05 01:28:37 +0000
commitb3861e72ec527e73bcbb44978e531f5731237c0c (patch)
tree512dc43e54920a25798215344a2de5a9647183b4 /worldtime_protocol/timezone.cpp
parent991f409e2eec6c19aed25c9daffd5f7297c96811 (diff)
try to override timezone list index by matching timezone name (list index inconsistent accross versions of windows)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@199 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'worldtime_protocol/timezone.cpp')
-rw-r--r--worldtime_protocol/timezone.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/worldtime_protocol/timezone.cpp b/worldtime_protocol/timezone.cpp
index ee4a8ed..5b2c31b 100644
--- a/worldtime_protocol/timezone.cpp
+++ b/worldtime_protocol/timezone.cpp
@@ -19,7 +19,6 @@ bool build_timezone_list() {
DWORD dwcbDLT;
LS_TZREG Temp;
FILETIME ftLastWrite;
- unsigned int list_index = 0;
bool win9x = false;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TZREG, 0, KEY_ENUMERATE_SUB_KEYS, &HKlmtz) != ERROR_SUCCESS) {
@@ -28,7 +27,7 @@ bool build_timezone_list() {
return false;
}
- while(RegEnumKeyEx(HKlmtz, dwIndex++, tcName, &dwcbName, NULL, NULL, NULL, &ftLastWrite) != ERROR_NO_MORE_ITEMS) {
+ while(RegEnumKeyEx(HKlmtz, dwIndex, tcName, &dwcbName, NULL, NULL, NULL, &ftLastWrite) != ERROR_NO_MORE_ITEMS) {
if(RegOpenKeyEx(HKlmtz, tcName, 0,KEY_QUERY_VALUE, &KKtz) != ERROR_SUCCESS) {
RegCloseKey(HKlmtz);
@@ -53,11 +52,11 @@ bool build_timezone_list() {
RegCloseKey(KKtz);
- Temp.list_index = list_index;
+ Temp.list_index = dwIndex;
timezone_list.push_back(Temp);
dwcbName = MAX_SIZE;
- list_index++;
+ dwIndex++;
}
RegCloseKey(HKlmtz);