My code:
predicates.add(criteriaBuilder.between(
root.get("date"),
criteriaBuilder.literal(Timestamp.valueOf(LocalDateTime.now(ZoneOffset.UTC).minusMinutes(5))),
criteriaBuilder.literal(Timestamp.valueOf(LocalDateTime.now(ZoneOffset.UTC).minusMinutes(1)))
));
If the current time is 10:00 AM, then the bounds are between 10:00 AM and 10:04 AM. My question is, will this predicate consider timestamps up to 10:04:59.999 seconds, or just up to 10:04:00.000?
Thank you!
New contributor
Tech Rider is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.