[open-ils-commits] r16886 - trunk/Open-ILS/src/perlmods/OpenILS/Application (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 8 13:09:40 EDT 2010
Author: phasefx
Date: 2010-07-08 13:09:36 -0400 (Thu, 08 Jul 2010)
New Revision: 16886
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Log:
Fixes Mark Claimed Returned. It seems that dojo isn't the only library picky about ISO8601; DateTime::Format::ISO8601->parse_datetime was choking in this case
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-07-08 15:58:49 UTC (rev 16885)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-07-08 17:09:36 UTC (rev 16886)
@@ -373,6 +373,9 @@
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
+ }
# make it look like the circ stopped at the cliams returned time
$circ->stop_fines_time($backdate);
@@ -502,6 +505,9 @@
my $original_date = DateTime::Format::ISO8601->new->parse_datetime(cleanse_ISO8601($circ->due_date));
my $new_date = DateTime::Format::ISO8601->new->parse_datetime($date);
$date = $new_date->ymd . 'T' . $original_date->strftime('%T%z');
+ if ($date =~ /^(\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d-\d\d)(\d\d)$/) {
+ $date = "$1:$2"; # put a colon in the timestamp component for DateTime::Format::ISO8601->parse_datetime
+ }
}
$circ->due_date($date);
More information about the open-ils-commits
mailing list