}
}
-my $xact_start = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($circ->xact_start))->epoch;
-my $due_date = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($circ->due_date))->epoch;
-my $twenty_days = OpenSRF::Utils->interval_to_seconds('480 h 0 m 0 s');
+my $xact_start = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($circ->xact_start));
+my $due_date = DateTime::Format::ISO8601->parse_datetime(cleanse_ISO8601($circ->due_date));
# Rewrite history; technically we should rewrite status_changed_item on the copy as well, but, meh...
-$circ->xact_start( $apputils->epoch2ISO8601($xact_start - $twenty_days) );
-$circ->due_date( $apputils->epoch2ISO8601($due_date - $twenty_days) );
+$circ->xact_start( $xact_start->subtract( days => 20 )->iso8601() );
+$circ->due_date( $due_date->subtract( days => 20 )->iso8601() );
$cstore_ses->connect; # need stateful connection
my $xact = $cstore_ses->request('open-ils.cstore.transaction.begin')->gather(1);