From 1b84c490d3035a43c37d10042ce0250c6dabd69f Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 10 Aug 2010 16:16:53 +0000 Subject: [PATCH] replace this broken regexp with cleanse_ISO8601 git-svn-id: svn://svn.open-ils.org/ILS/trunk@17151 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index f19ccca342..2ee2334fc4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -505,10 +505,7 @@ sub set_circ_due_date { 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); -- 2.11.0