ICU-7229 In addition to the previous change, nullify TIME_ZONE_INFORMATION in getWindowsTimeZoneInfo, because we do not set standard/daylight names.

X-SVN-Rev: 26852
This commit is contained in:
Yoshito Umaoka 2009-11-06 05:48:37 +00:00
parent e17f7525bb
commit 62ed917dd8

View file

@ -20,6 +20,7 @@
#include "unicode/basictz.h"
#include "putilimp.h"
#include "uassert.h"
#include "cmemory.h"
# define WIN32_LEAN_AND_MEAN
# define VC_EXTRALEAN
@ -123,7 +124,9 @@ static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar
int32_t standardBias;
SYSTEMTIME daylightDate;
SYSTEMTIME standardDate;
if (getSystemTimeInformation(tz, daylightDate, standardDate, bias, daylightBias, standardBias)) {
uprv_memset(zoneInfo, 0, sizeof(TIME_ZONE_INFORMATION)); // We do not set standard/daylight names, so nullify first.
zoneInfo->Bias = bias;
zoneInfo->DaylightBias = daylightBias;
zoneInfo->StandardBias = standardBias;