[open-ils-commits] r16986 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 20 15:54:43 EDT 2010
Author: miker
Date: 2010-07-20 15:54:38 -0400 (Tue, 20 Jul 2010)
New Revision: 16986
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Log:
Patch from John Craig providing a saner timestamp cleansing setup for backdated circs
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-07-20 15:58:48 UTC (rev 16985)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2010-07-20 19:54:38 UTC (rev 16986)
@@ -373,10 +373,10 @@
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
- }
+ # clean it up once again; need a : in the timezone offset. E.g. -06:00 not -0600
+ $backdate = cleanse_ISO8601($backdate);
+
# make it look like the circ stopped at the cliams returned time
$circ->stop_fines_time($backdate);
my $evt = OpenILS::Application::Circ::CircCommon->void_overdues($e, $circ, $backdate);
More information about the open-ils-commits
mailing list