From: gmc Date: Thu, 5 Aug 2010 02:58:58 +0000 (+0000) Subject: bug 613703: normalize backdate on item checkin better X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=108194295e1709086356a0fd8f61862cf6e7f77e;p=Evergreen.git bug 613703: normalize backdate on item checkin better Fixes bug that appears to cause all checkins uploaded via offline circ to fail with an "invalid date format" error. Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@17085 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm index 6c7c952013..935205ccbb 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm @@ -2247,7 +2247,7 @@ sub checkin_handle_lost { sub checkin_handle_backdate { my $self = shift; - my $bd = $self->backdate; + my $bd = clense_ISO8601($self->backdate); # ------------------------------------------------------------------ # clean up the backdate for date comparison @@ -2255,7 +2255,7 @@ sub checkin_handle_backdate { # ------------------------------------------------------------------ my $original_date = DateTime::Format::ISO8601->new->parse_datetime(clense_ISO8601($self->circ->due_date)); my $new_date = DateTime::Format::ISO8601->new->parse_datetime($bd); - $bd = $new_date->ymd . 'T' . $original_date->strftime('%T%z'); + $bd = clense_ISO8601($new_date->ymd . 'T' . $original_date->strftime('%T%z')); $self->backdate($bd);