[open-ils-commits] r17151 - trunk/Open-ILS/src/perlmods/OpenILS/Application (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 10 12:16:56 EDT 2010
Author: phasefx
Date: 2010-08-10 12:16:53 -0400 (Tue, 10 Aug 2010)
New Revision: 17151
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Log:
replace this broken regexp with cleanse_ISO8601
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-08-10 16:16:49 UTC (rev 17150)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-08-10 16:16:53 UTC (rev 17151)
@@ -505,10 +505,7 @@
if (!(interval_to_seconds($circ->duration) % 86400)) { # duration is divisible by days
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
- }
+ $date = cleanse_ISO8601( $new_date->ymd . 'T' . $original_date->strftime('%T%z') );
}
$circ->due_date($date);
More information about the open-ils-commits
mailing list