ICU-7017 Workaround for TimeZone#setRawOffset problem with Asia/Dhaka in tzdata2009i. Because there is no future standard time rule is set for Asia/Dhaka, the zone stays in DST forever. TimeZone#setRawOffset did not expect such irregular rule before.

X-SVN-Rev: 26155
This commit is contained in:
Yoshito Umaoka 2009-06-24 04:22:13 +00:00
parent 6e5aa7bbd6
commit 77015374a6

View file

@ -218,8 +218,14 @@ public class OlsonTimeZone extends BasicTimeZone {
// set DST saving amount and start year
stz.setDSTSavings(sav);
} else {
// We should not get here...
bDst = false;
// This could only happen if last rule is DST
// and the rule used forever. For example, Asia/Dhaka
// in tzdata2009i stays in DST forever.
// Hack - set DST starting at midnight on Jan 1st,
// ending 23:59:59.999 on Dec 31st
stz.setStartRule(0, 1, 0);
stz.setEndRule(11, 31, Grego.MILLIS_PER_DAY - 1);
}
}