From 34939c21ac7461073daba55fc5a4e3a14351c30f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 15 Jun 2020 10:28:48 -0400 Subject: [PATCH] LP#1879983: ensure that last slot for day falls before closing time For example, if the library is scheduled to close at 19:00 and offers 15-minute pickup windows, the last slot offered is now 18:45 rather than 19:00. Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm index 62ddc2e1df..6a9df9b4c3 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Curbside.pm @@ -543,7 +543,7 @@ sub times_for_date { my $now_obj = DateTime->now; # NOTE: does not need timezone set because it gets UTC, not floating, so we can math with it my $step_obj = $start_obj->clone; - while (DateTime->compare($step_obj,$end_obj) <= 0) { # inside HOO + while (DateTime->compare($step_obj,$end_obj) < 0) { # inside HOO if (DateTime->compare($step_obj,$now_obj) >= 0) { # only offer times in the future my $step_ts = $step_obj->strftime('%FT%T%z'); my $other_slots = $e->search_action_curbside({org => $org, slot => $step_ts}, {idlist => 1}); -- 2.11.0