View | Details | Raw Unified | Return to bug 35659
Collapse All | Expand All

(-)a/Koha/OAI/Client/Harvester.pm (-6 / +1 lines)
Lines 52-62 use Date::Calc qw( Link Here
52
    Today
52
    Today
53
);
53
);
54
54
55
my $strp = DateTime::Format::Strptime->new(
56
    pattern   => '%FT%TZ',
57
    time_zone => 'floating',
58
);
59
60
our $xslt_engine = Koha::XSLT::Base->new;
55
our $xslt_engine = Koha::XSLT::Base->new;
61
56
62
=head2 new
57
=head2 new
Lines 136-142 sub init { Link Here
136
        # Change this to yyyy-mm-dd
131
        # Change this to yyyy-mm-dd
137
        my ( $nowyear, $nowmonth, $nowday ) = Today();
132
        my ( $nowyear, $nowmonth, $nowday ) = Today();
138
        my @date     = Add_Delta_Days( $nowyear, $nowmonth, $nowday, -$days );
133
        my @date     = Add_Delta_Days( $nowyear, $nowmonth, $nowday, -$days );
139
        my $dt_start = DateTime->new( year => $date[0], month => $date[1], day => $date[2] );
134
        my $dt_start = dt_from_string( $date[0] . '-' . $date[1] . '-' . $date[2] );
140
        $start_date = $dt_start->ymd();
135
        $start_date = $dt_start->ymd();
141
        $self->printlog("Harvesting from $start_date");
136
        $self->printlog("Harvesting from $start_date");
142
    }
137
    }
(-)a/misc/cronjobs/harvest_oai.pl (-4 / +2 lines)
Lines 99-112 try { Link Here
99
    exit;
99
    exit;
100
};
100
};
101
101
102
cronlogaction( { action => 'Start', info => "Starting OAI Harvest" } );
102
cronlogaction( { info => $command_line_options } );
103
cronlogaction( { info   => "Command line: $command_line_options" } );
104
103
105
my $harvester =
104
my $harvester =
106
    Koha::OAI::Client::Harvester->new( { server => $server, days => $days, force => $force, logger => \&logFunction } );
105
    Koha::OAI::Client::Harvester->new( { server => $server, days => $days, force => $force, logger => \&logFunction } );
107
$harvester->init();
106
$harvester->init();
108
107
109
cronlogaction( { action => 'End', info => "Ending OAI Harvest" } );
108
cronlogaction( { action => 'End', info => "COMPLETED" } );
110
109
111
sub logFunction {
110
sub logFunction {
112
    my $message = shift;
111
    my $message = shift;
113
- 

Return to bug 35659