Bugzilla – Attachment 99745 Details for
Bug 10662
Build OAI-PMH Harvesting Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10662: Strip UTC designators from header_datestamp
Bug-10662-Strip-UTC-designators-from-headerdatesta.patch (text/plain), 1.30 KB, created by
David Cook
on 2020-02-28 07:01:31 UTC
(
hide
)
Description:
Bug 10662: Strip UTC designators from header_datestamp
Filename:
MIME Type:
Creator:
David Cook
Created:
2020-02-28 07:01:31 UTC
Size:
1.30 KB
patch
obsolete
>From 4473a823403d4fa52dbe00acf05f397c3ba5da5d Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 28 Feb 2020 06:59:42 +0000 >Subject: [PATCH] Bug 10662: Strip UTC designators from header_datestamp > >--- > Koha/OAI/Harvester/Import/Record.pm | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > >diff --git a/Koha/OAI/Harvester/Import/Record.pm b/Koha/OAI/Harvester/Import/Record.pm >index 2e672cd8a5..6d29795128 100755 >--- a/Koha/OAI/Harvester/Import/Record.pm >+++ b/Koha/OAI/Harvester/Import/Record.pm >@@ -73,7 +73,9 @@ sub new { > > my $xpath_datestamp = XML::LibXML::XPathExpression->new("oai:header/oai:datestamp"); > my $datestamp = $xpc->findnodes($xpath_datestamp,$root)->shift; >- $args->{header_datestamp} = $datestamp->textContent; >+ if ($datestamp && $datestamp->textContent){ >+ $args->{header_datestamp} = _strip_UTC_designators($datestamp->textContent); >+ } > > my $xpath_status = XML::LibXML::XPathExpression->new(q{oai:header/@status}); > my $status_node = $xpc->findnodes($xpath_status,$root)->shift; >@@ -345,4 +347,11 @@ sub delete_koha_record { > return $action; > } > >+sub _strip_UTC_designators { >+ my ( $timestamp ) = @_; >+ $timestamp =~ s/T/ /g; >+ $timestamp =~ s/Z//g; >+ return $timestamp; >+} >+ > 1; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10662
:
20757
|
20758
|
21954
|
42446
|
42447
|
42448
|
44792
|
44793
|
47675
|
48096
|
49832
|
50254
|
50980
|
51510
|
51511
|
51512
|
51514
|
51562
|
51563
|
51564
|
51565
|
51705
|
53258
|
53259
|
53260
|
53361
|
53362
|
64444
|
64445
|
64446
|
64479
|
64480
|
64481
|
65016
|
65017
|
65018
|
65019
|
68508
|
71008
|
71009
|
71010
|
71011
|
71012
|
71013
|
71014
|
71015
|
78569
|
78570
|
78571
|
78572
|
78573
|
78574
|
78575
|
78576
|
78577
|
78583
|
78601
|
78617
|
78754
|
78756
|
78758
|
78760
|
78762
|
78764
|
78767
|
78769
|
78771
|
78859
|
78860
|
78914
|
78956
|
79039
|
79045
|
81783
|
81784
|
81786
|
81789
|
81790
|
81855
|
81856
|
81861
|
81862
|
81863
|
81864
|
81902
|
82219
|
84318
|
84319
|
84320
|
84321
|
84322
|
85152
|
85224
|
85225
|
85226
|
85227
|
85228
|
85229
|
99739
|
99740
|
99741
|
99742
|
99743
|
99744
| 99745