Additional guard against fixed time zones

This commit is contained in:
Alexey Andreev 2015-05-16 21:26:22 +03:00
parent 46da627318
commit 7d49a2bd99

View File

@ -79,7 +79,7 @@ public class DateTimeZoneProvider {
for (String id : getIds()) { for (String id : getIds()) {
DateTimeZone tz = getTimeZone(id); DateTimeZone tz = getTimeZone(id);
int tzOffset = tz.getOffset(time) / 60_000; int tzOffset = tz.getOffset(time) / 60_000;
if (Math.abs(tzOffset - offset) > 120) { if (Math.abs(tzOffset - offset) > 120 || tz.previousTransition(time) == time) {
continue; continue;
} }
zones.add(new Score(tz)); zones.add(new Score(tz));