]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 15 Nov 2021 11:38:39 +0000 (12:38 +0100)
commit0b3d856bc42ab9372e25eae799ea50beb4cf1c0e
treee081f94d8f9ccd25dbb4c718dda134c6f928b916
parent62bda478abc4ccedb211d17c4657f6eace5d1080
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>
Koha/OAI/Server/Identify.pm