ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Gray (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OFBIZ-10875) Temporal expressions sometimes incorrectly calculate next occurrence
Date Fri, 12 Apr 2019 09:35:00 GMT

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

Scott Gray resolved OFBIZ-10875.
--------------------------------
       Resolution: Fixed
         Assignee: Scott Gray
    Fix Version/s: Upcoming Branch

Fixed in r1857382

> 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)

Mime
View raw message