[open-ils-commits] r17085 - branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 4 22:59:01 EDT 2010


Author: gmc
Date: 2010-08-04 22:58:58 -0400 (Wed, 04 Aug 2010)
New Revision: 17085

Modified:
   branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
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 <gmc at esilibrary.com>


Modified: branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-04 22:28:34 UTC (rev 17084)
+++ branches/rel_1_6_0/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-05 02:58:58 UTC (rev 17085)
@@ -2247,7 +2247,7 @@
 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 @@
     # ------------------------------------------------------------------
     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);
 



More information about the open-ils-commits mailing list