gitgabrio commented on code in PR #3795:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3795#discussion_r1863313932
##########
jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/timer/BusinessCalendarImpl.java:
##########
@@ -251,7 +253,9 @@ public Date calculateBusinessTimeAsDate(String
timeExpression) {
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
} else if (currentCalHour < startHour) {
- c.add(Calendar.HOUR_OF_DAY, startHour);
+ c.add(Calendar.HOUR_OF_DAY, startHour - currentCalHour);
+ c.set(Calendar.MINUTE, 0);
Review Comment:
HI @martinweiler
I have the impression that setting MINUTE and SECOND to = 0 could be a
problem, because
1) c.add(Calendar.HOUR_OF_DAY, startHour); <. this is meant to push the
calendar forward, to match the current hour
2) but setting MINUTE and SECONDS to = 0 pushes the calendar back; so after
them the current calendar is "before" the start hour
I'm testing that modification in the other PR, and this is what I found
there - I'll keep investigating, anyway, to double check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]