Skip to content
Permalink
Browse files
use today of last modified is not available
  • Loading branch information
mgeiss committed Jun 12, 2017
1 parent c851ae0 commit 52d94ef1b60bfdf6d961975e15552d0883563d42
Showing 1 changed file with 3 additions and 1 deletion.
@@ -31,6 +31,7 @@
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.time.Clock;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@@ -73,7 +74,8 @@ public TellerBalanceSheet getBalance(final String tellerCode) {
optionalTellerEntity.ifPresent(tellerEntity -> {

final String accountIdentifier = tellerEntity.getTellerAccountIdentifier();
final LocalDateTime lastModifiedOn = tellerEntity.getLastModifiedOn();
final LocalDateTime lastModifiedOn =
tellerEntity.getLastModifiedOn() != null ? tellerEntity.getLastModifiedOn() : LocalDateTime.now(Clock.systemUTC());
final LocalDateTime startDate = lastModifiedOn.withHour(0).withMinute(0).withSecond(0).withNano(0);
final LocalDateTime endDate = lastModifiedOn.withHour(23).withMinute(59).withSecond(59).withNano(999);
final String dateRange =

0 comments on commit 52d94ef

Please sign in to comment.