LP#1857156: handle HHH:MM:SS durations in loans user/dbs/lp1857156_fix_hhh_mm_ss_loan_durations_signoff
authorGalen Charlton <gmc@equinoxinitiative.org>
Fri, 20 Dec 2019 17:55:16 +0000 (12:55 -0500)
committerDan Scott <dan@coffeecode.net>
Fri, 3 Jan 2020 16:57:34 +0000 (11:57 -0500)
commit62b5fbb9ff0646596e32cb901aba2e54a1258be2
treea8541b004b7e11dd7d243237d2d28be0551736b8
parent2cd405314e31fdb6f2882b60b1224c47dce46d42
LP#1857156: handle HHH:MM:SS durations in loans

This patch fixes a problem where loan durations of the form
HHH:MM:SS, where the hours component is longer than 2 digits, could
cause checkouts to fail. This sort of duration has been observed
in cases where a library wanted a long-term reserves loan that
doesn't have the due time bumped up to midnight.

To test
-------
[1] Set up a circulation policy that has a loan duration of 167:59:59.
[2] Attempt a checkout that uses that policy. Note that the checkout
    will fail.
[3] Apply the patch and repeat step 2. This time, the checkout should
    succeed.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/src/perlmods/lib/OpenILS/Utils/DateTime.pm
Open-ILS/src/perlmods/t/14-OpenILS-Utils.t