From 6d9cfd7f143ff164a65811bf6118a0d8511c95ba Mon Sep 17 00:00:00 2001 From: Alan Liu Date: Thu, 9 Dec 1999 06:06:05 +0000 Subject: [PATCH] ICU-186 fix setStartRule setEndRule to set DST savings if nec X-SVN-Rev: 351 --- icu4c/source/i18n/simpletz.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/icu4c/source/i18n/simpletz.cpp b/icu4c/source/i18n/simpletz.cpp index 3b8281dc83..62577ceecd 100644 --- a/icu4c/source/i18n/simpletz.cpp +++ b/icu4c/source/i18n/simpletz.cpp @@ -807,6 +807,9 @@ SimpleTimeZone::decodeStartRule(UErrorCode& status) if(U_FAILURE(status)) return; useDaylight = ((startDay != 0) && (endDay != 0) ? TRUE : FALSE); + if (useDaylight && dstSavings == 0) { + dstSavings = U_MILLIS_PER_HOUR; + } if (startDay != 0) { if (startMonth < Calendar::JANUARY || startMonth > Calendar::DECEMBER) { status = U_ILLEGAL_ARGUMENT_ERROR; @@ -859,6 +862,9 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status) if(U_FAILURE(status)) return; useDaylight = ((startDay != 0) && (endDay != 0) ? TRUE : FALSE); + if (useDaylight && dstSavings == 0) { + dstSavings = U_MILLIS_PER_HOUR; + } if (endDay != 0) { if (endMonth < Calendar::JANUARY || endMonth > Calendar::DECEMBER) { status = U_ILLEGAL_ARGUMENT_ERROR;