Skip to content

Commit

Permalink
Fix #7683 - rdb$time_zone_util.transitions returns an infinite result…
Browse files Browse the repository at this point in the history
…set.
  • Loading branch information
asfernandes committed Jul 24, 2023
1 parent aa164fb commit 059402d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/common/TimeZoneUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,10 @@ bool TimeZoneRuleIterator::next()
}

if (!hasNext || icuDate > MAX_ICU_TIMESTAMP)
{
icuDate = MAX_ICU_TIMESTAMP;
hasNext = false;
}

icuLib.ucalSetMillis(icuCalendar, icuDate, &icuErrorCode);

Expand All @@ -1130,7 +1133,7 @@ bool TimeZoneRuleIterator::next()
(icuDate == MAX_ICU_TIMESTAMP ? ISC_TIME_SECONDS_PRECISION / 1000 : 0));
endTimestamp.time_zone = TimeZoneUtil::GMT_ZONE;

startTicks = endTicks + 1;
startTicks = (hasNext ? endTicks : toTicks) + 1;

return true;
}
Expand Down

0 comments on commit 059402d

Please sign in to comment.