@@ -, +, @@ --- Koha/OAI/Server/Identify.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/Koha/OAI/Server/Identify.pm +++ a/Koha/OAI/Server/Identify.pm @@ -54,7 +54,13 @@ sub new { # will be returned and we will report the fallback 0001-01-01. sub _get_earliest_datestamp { my $dbh = C4::Context->dbh; - my ( $earliest ) = $dbh->selectrow_array("SELECT MIN(timestamp) AS earliest FROM biblio" ); + # We do not need to perform timezone conversion here, because the time zone + # is set to UTC for the entire SQL session in Koha/OAI/Server/Repository.pm + my $query = ' + SELECT DATE_FORMAT(MIN(timestamp), '%Y-%m-%dT%H:%i:%SZ') AS earliest + FROM biblio + '; + my ( $earliest ) = $dbh->selectrow_array($query); return $earliest } --