]> git.koha-community.org Git - koha.git/commit
Bug 21105: oai.pl returns invalid earliestDatestamp
authorRudolf Byker <rudolfbyker@gmail.com>
Thu, 15 Apr 2021 07:32:30 +0000 (09:32 +0200)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 19 Nov 2021 16:32:05 +0000 (11:32 -0500)
commit0338a1bf742e1cda93edc857c91333260d83915d
tree7ead2306f6839e406ee5a3325e49656c205bbfde
parent614eb80c9c9729c12dc6d892c2396af02e406e0d
Bug 21105: oai.pl returns invalid earliestDatestamp

For OAI-PMH, all date and time values must be in the format
"YYYY-MM-DDThh:mm:ssZ" and in UTC. Currently,
Identify.earliestDatestamp uses the SQL format "YYYY-MM-DD hh:mm:ss".
This patch fixes that.

To test:
1) Get a Koha instance with OAI-PMH enabled.
2) Visit /cgi-bin/koha/oai.pl?verb=Identify, view source for the page
   and observe that earliestDate is in the wrong format
   "YYYY-MM-DD hh:mm:ss"
3) Apply patch
4) Visit /cgi-bin/koha/oai.pl?verb=Identify, view the source for the page
   and observe that earliestDate is now in the correct format
   "YYYY-MM-DDThh:mm:ssZ"
5) Sign off

Sponsored-by: Reformational Study Centre
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/OAI/Server/Identify.pm