From e067e004fe0c834264bbd7d210d542ee1c42894f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 6 Nov 2018 16:22:43 -0500 Subject: [PATCH] LP#1635737 Due date DST-aware thinko fix Minor code refactor to fix thinko and syntax issues. Signed-off-by: Bill Erickson Signed-off-by: Dan Wells --- Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index fab7796625..73d69efda6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -2396,11 +2396,11 @@ sub create_due_date { ) || 'local'; my $due_date = $start_time ? - DateTime->now(time_zone => $tz) : - $due_date = DateTime::Format::ISO8601 + DateTime::Format::ISO8601 ->new ->parse_datetime(clean_ISO8601($start_time)) - ->set_time_zone($tz); + ->set_time_zone($tz) : + DateTime->now(time_zone => $tz); # add the circ duration $due_date->add(seconds => OpenILS::Utils::DateTime->interval_to_seconds($duration, $due_date)); -- 2.11.0