[ 
https://issues.apache.org/jira/browse/OFBIZ-10875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Gray closed OFBIZ-10875.
------------------------------

> Temporal expressions sometimes incorrectly calculate next occurrence
> --------------------------------------------------------------------
>
>                 Key: OFBIZ-10875
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10875
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>            Reporter: Scott Gray
>            Assignee: Scott Gray
>            Priority: Major
>             Fix For: Upcoming Branch
>
>
> I've noticed that temporal expressions that involve the last hour of a day 
> incorrectly calculate the next occurrence, effectively skipping the "real" 
> next occurrence and ending up on the one following that.
> This appears to occur because MinuteRange.next() does not check if the day 
> has been "bumped" (ExpressionContext.dayBumped) once it has finished 
> incrementing the calendar to find the next minute in the expression range.  
> It checks if the hour has been bumped but not day or month.
> The following expression can reproduce the issue:
> {code}
> Intersection [11PM_MON_FRI]:
>   MinuteRange [MINUTE_00], start = 00, end = 00
>   HourRange [HOUR_23], start = 23, end = 23
>   DayOfWeekRange [MON_TO_FRI], start = 2, end = 6
> {code}
> When next() is called using 2019-03-26 23:00:00.0
> the method will respond with 2019-03-28 23:00:00.0
> instead of the expected 2019-03-27 23:00:00.0
> Effectively means the above expression would provide every second weekday 
> instead of every weekday.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to