OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************** | 2 ******************************************************************************** |
3 * Copyright (C) 2005-2013, International Business Machines | 3 * Copyright (C) 2005-2013, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 * | 6 * |
7 * File WINTZ.CPP | 7 * File WINTZ.CPP |
8 * | 8 * |
9 ******************************************************************************** | 9 ******************************************************************************** |
10 */ | 10 */ |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 sizeof(apiTZI.DaylightDate)); | 278 sizeof(apiTZI.DaylightDate)); |
279 | 279 |
280 /* Convert the wchar_t* standard name to char* */ | 280 /* Convert the wchar_t* standard name to char* */ |
281 uprv_memset(apiStdName, 0, sizeof(apiStdName)); | 281 uprv_memset(apiStdName, 0, sizeof(apiStdName)); |
282 u_strFromWCS(apiStd, MAX_LENGTH_ID, NULL, apiTZI.StandardName, -1, &status); | 282 u_strFromWCS(apiStd, MAX_LENGTH_ID, NULL, apiTZI.StandardName, -1, &status); |
283 u_austrncpy(apiStdName, apiStd, sizeof(apiStdName) - 1); | 283 u_austrncpy(apiStdName, apiStd, sizeof(apiStdName) - 1); |
284 | 284 |
285 tmpid[0] = 0; | 285 tmpid[0] = 0; |
286 | 286 |
287 id = GetUserGeoID(GEOCLASS_NATION); | 287 id = GetUserGeoID(GEOCLASS_NATION); |
288 errorCode = GetGeoInfo(id,GEO_ISO2,ISOcode,3,0); | 288 errorCode = GetGeoInfoA(id,GEO_ISO2,ISOcode,3,0); |
289 | 289 |
290 bundle = ures_openDirect(NULL, "windowsZones", &status); | 290 bundle = ures_openDirect(NULL, "windowsZones", &status); |
291 ures_getByKey(bundle, "mapTimezones", bundle, &status); | 291 ures_getByKey(bundle, "mapTimezones", bundle, &status); |
292 | 292 |
293 /* Note: We get the winid not from static tables but from resource bundle. *
/ | 293 /* Note: We get the winid not from static tables but from resource bundle. *
/ |
294 while (U_SUCCESS(status) && ures_hasNext(bundle)) { | 294 while (U_SUCCESS(status) && ures_hasNext(bundle)) { |
295 UBool idFound = FALSE; | 295 UBool idFound = FALSE; |
296 const char* winid; | 296 const char* winid; |
297 UResourceBundle* winTZ = ures_getNextResource(bundle, NULL, &status); | 297 UResourceBundle* winTZ = ures_getNextResource(bundle, NULL, &status); |
298 if (U_FAILURE(status)) { | 298 if (U_FAILURE(status)) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 uprv_strcpy(icuid, tmpid); | 361 uprv_strcpy(icuid, tmpid); |
362 } | 362 } |
363 } | 363 } |
364 | 364 |
365 ures_close(bundle); | 365 ures_close(bundle); |
366 | 366 |
367 return icuid; | 367 return icuid; |
368 } | 368 } |
369 | 369 |
370 #endif /* U_PLATFORM_HAS_WIN32_API */ | 370 #endif /* U_PLATFORM_HAS_WIN32_API */ |
OLD | NEW |