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

(-)a/Koha/OAI/Harvester/Import/Record.pm (-2 / +10 lines)
Lines 73-79 sub new { Link Here
73
73
74
        my $xpath_datestamp = XML::LibXML::XPathExpression->new("oai:header/oai:datestamp");
74
        my $xpath_datestamp = XML::LibXML::XPathExpression->new("oai:header/oai:datestamp");
75
        my $datestamp = $xpc->findnodes($xpath_datestamp,$root)->shift;
75
        my $datestamp = $xpc->findnodes($xpath_datestamp,$root)->shift;
76
        $args->{header_datestamp} = $datestamp->textContent;
76
        if ($datestamp && $datestamp->textContent){
77
            $args->{header_datestamp} = _strip_UTC_designators($datestamp->textContent);
78
        }
77
79
78
        my $xpath_status = XML::LibXML::XPathExpression->new(q{oai:header/@status});
80
        my $xpath_status = XML::LibXML::XPathExpression->new(q{oai:header/@status});
79
        my $status_node = $xpc->findnodes($xpath_status,$root)->shift;
81
        my $status_node = $xpc->findnodes($xpath_status,$root)->shift;
Lines 345-348 sub delete_koha_record { Link Here
345
    return $action;
347
    return $action;
346
}
348
}
347
349
350
sub _strip_UTC_designators {
351
	my ( $timestamp ) = @_;
352
	$timestamp =~ s/T/ /g;
353
	$timestamp =~ s/Z//g;
354
	return $timestamp;
355
}
356
348
1;
357
1;
349
- 

Return to bug 10662