From 8869811c18c1cb57d3e03e1407aaf9e314d41db3 Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 20 Jul 2010 19:54:38 +0000 Subject: [PATCH] Patch from John Craig providing a saner timestamp cleansing setup for backdated circs git-svn-id: svn://svn.open-ils.org/ILS/trunk@16986 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index 2cbc4bd5e5..2a414d3cd8 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -373,9 +373,9 @@ sub set_circ_claims_returned { my $original_date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($circ->due_date)); my $new_date = DateTime::Format::ISO8601->new->parse_datetime($backdate); $backdate = $new_date->ymd . 'T' . $original_date->strftime('%T%z'); - if ($backdate =~ /^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d-\d\d)(\d\d)$/) { - $backdate = "$1:$2"; # put a colon in the timestamp component for DateTime::Format::ISO8601->parse_datetime - } + + # clean it up once again; need a : in the timezone offset. E.g. -06:00 not -0600 + $backdate = cleanse_ISO8601($backdate); # make it look like the circ stopped at the cliams returned time $circ->stop_fines_time($backdate); -- 2.11.0