Bug 35659: (QA follow-up) Fix DateTime and cronlogaction messages
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
57f317ff10
commit
4bfb4da587
|
|
@ -52,11 +52,6 @@ use Date::Calc qw(
|
|||
Today
|
||||
);
|
||||
|
||||
my $strp = DateTime::Format::Strptime->new(
|
||||
pattern => '%FT%TZ',
|
||||
time_zone => 'floating',
|
||||
);
|
||||
|
||||
our $xslt_engine = Koha::XSLT::Base->new;
|
||||
|
||||
=head2 new
|
||||
|
|
@ -136,7 +131,7 @@ sub init {
|
|||
# Change this to yyyy-mm-dd
|
||||
my ( $nowyear, $nowmonth, $nowday ) = Today();
|
||||
my @date = Add_Delta_Days( $nowyear, $nowmonth, $nowday, -$days );
|
||||
my $dt_start = DateTime->new( year => $date[0], month => $date[1], day => $date[2] );
|
||||
my $dt_start = dt_from_string( $date[0] . '-' . $date[1] . '-' . $date[2] );
|
||||
$start_date = $dt_start->ymd();
|
||||
$self->printlog("Harvesting from $start_date");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,14 +99,13 @@ try {
|
|||
exit;
|
||||
};
|
||||
|
||||
cronlogaction( { action => 'Start', info => "Starting OAI Harvest" } );
|
||||
cronlogaction( { info => "Command line: $command_line_options" } );
|
||||
cronlogaction( { info => $command_line_options } );
|
||||
|
||||
my $harvester =
|
||||
Koha::OAI::Client::Harvester->new( { server => $server, days => $days, force => $force, logger => \&logFunction } );
|
||||
$harvester->init();
|
||||
|
||||
cronlogaction( { action => 'End', info => "Ending OAI Harvest" } );
|
||||
cronlogaction( { action => 'End', info => "COMPLETED" } );
|
||||
|
||||
sub logFunction {
|
||||
my $message = shift;
|
||||
|
|
|
|||
Loading…
Reference in New Issue