Even though a time zone does not observe DST, "getDSTSavings()" is returning a non-zero value.
After discussing further with other I18N SQE, it was felt that this can be confusing to a user. Though the user does have "useDaylightTime()" to figure out whether the time zone observes DST, having "getDSTSavings()" return a contradicting value is inconsistent.
Here's a quick program to demonstrate this:
----------------------------- Cut Here --------------------------
import java.util.*;
public class GetDSTSavingsTest {
SimpleTimeZone stz;
public GetDSTSavingsTest() {
stz = (SimpleTimeZone)TimeZone.getTimeZone("Asia/Tokyo");
System.out.println("Observes daylight savings time? " +
stz.useDaylightTime());
System.out.println("Daylight savings time value(should be 0 if not " +
"observed): " + stz.getDSTSavings());
}
public static void main(String[] args) {
new GetDSTSavingsTest();
}
}
----------------------------- Cut Here --------------------------
edmund.lou@eng 1999-12-17