mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-21 12:40:02 +00:00
ICU-186 fix setStartRule setEndRule to set DST savings if nec
X-SVN-Rev: 351
This commit is contained in:
parent
4ec388cedf
commit
6d9cfd7f14
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue