Fix ZoneInfo.useDaylightTime()
Currently implemented is "are there any offset transitions in the future?". This is wrong: Transitions may occur in the future because of DST, but can also occur for other reasons (e.g. if the raw offset for a zone changes). We should be implementing: Is the currently active transition, or any transition in the future, one that has isDst == true. This was causing a test failure in libcore.java.util.TimeZoneTest#testDisplayNames for Asia/Novokuznetsk and Europe/Simferopol for tzdata2014g. This is because they have a transition entry for October 26, 2014 (i.e. in the future). For each, the existance of the transition entry is not due to an offset change at all: For Asia/Novokuznetsk it is because the abbreviation for the zone changes on that date (information we don't curently use). For Europe/Simferopol it is because the offset from UTC changes on that date (but there is no actual DST transtion). Bug: 17377276 (cherry-picked from commit d42af6ed) Change-Id: I148503280b8dee653bac32eec3aa58d232102628
Loading
Please sign in to comment