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);