Skip to content

Commit

Permalink
Fix wrong most recent date was set (#1126)
Browse files Browse the repository at this point in the history
Signed-off-by: Chun Han Hsiao <[email protected]>
  • Loading branch information
chhsiao90 authored Nov 22, 2023
1 parent 857bf09 commit 3bd2d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public void onResponse(SearchResponse response) {
// within n mins in which case we'll keep it
if (mostRecentDateFound != null && recentDateIncrease >= 0) {
Calendar potentialNewDate = Calendar.getInstance();
potentialNewDate.setTimeInMillis(mostRecentDateFound.getEpochSecond());
potentialNewDate.setTimeInMillis(mostRecentDateFound.toEpochMilli());
potentialNewDate.add(Calendar.MINUTE, recentDateIncrease);
Date oldDate = null;
// check boundaries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void onResponse(SearchResponse response) {
// within n mins in which case we'll keep it
if (mostRecentDateFound != null && recentDateIncrease >= 0) {
Calendar potentialNewDate = Calendar.getInstance();
potentialNewDate.setTimeInMillis(mostRecentDateFound.getEpochSecond());
potentialNewDate.setTimeInMillis(mostRecentDateFound.toEpochMilli());
potentialNewDate.add(Calendar.MINUTE, recentDateIncrease);
Date oldDate = null;
// check boundaries
Expand Down

0 comments on commit 3bd2d7a

Please sign in to comment.