[open-ils-commits] r17088 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 4 23:03:18 EDT 2010


Author: gmc
Date: 2010-08-04 23:03:15 -0400 (Wed, 04 Aug 2010)
New Revision: 17088

Modified:
   trunk/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: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-05 03:01:50 UTC (rev 17087)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2010-08-05 03:03:15 UTC (rev 17088)
@@ -2797,7 +2797,7 @@
 sub checkin_handle_backdate {
     my $self = shift;
 
-    my $bd = $self->backdate;
+    my $bd = cleanse_ISO8601($self->backdate);
 
     # ------------------------------------------------------------------
     # clean up the backdate for date comparison
@@ -2805,7 +2805,7 @@
     # ------------------------------------------------------------------
     my $original_date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_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 = cleanse_ISO8601($new_date->ymd . 'T' . $original_date->strftime('%T%z'));
 
     $self->backdate($bd);
 



More information about the open-ils-commits mailing list