A short term loan for 10 hours with "move to the end of the current service point hours" for closed library management, and an item checked out at a service point that closes at 3 am (past midnight) doesn't have correct due date/time.
Steps to reproduce:
- Setup Circ Desk 1 (or another service point) with hours that cross midnight. For this test, I used 8 am - 11:59 pm for Thu and 12:00 am - 3 am and 8 am - 11:59 pm for Fri.
- Setup a loan policy with a 10 hour (rolling) loan with "Move to the end of the current service point hours" selected for closed library management.
- Add the new loan policy to circulation rules. For this test, I applied this new policy to a material type of book.
- Check out an available book. For this test, I checked it out at 6 pm on Thu, which would normally make the book due at 6 am, but since the library is closed, it should be 3 am (when it closes).
Loan policy should be 10 hour loan with a due date of 3 am on Fri, Oct 18.
Loan policy applied is the new 10 hour loan but the due date is 11:59 on Thu, Oct 17.
Additionally, I tried the following:
- short term loan (5 hour) checked out an item at 7:15 pm at a service point opened until 2 am and that worked as expected (due date was 12:15 am - Fri) (closed library management wouldn't have been considered here)
- short term loan (5 hour) with closed library mgmt of "move to end of current service point hours", and checked out an item at 7:30 pm at a service point opened until 10 pm and that worked as expected (due date was 10 pm - Thu).
- *Therefore, this bug seems to be a combination of closed library management when the library hours cross midnight.