Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Commit c3eb9f2

Browse files
authored
Merge pull request #105 from whikloj/fix-solr-earliest-datetime
Format Solr datetime without decimal seconds
2 parents 1cfc2c7 + 2f50bed commit c3eb9f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

includes/request.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,11 @@ EOQ;
522522
$qp->buildQuery(format_string('!date_field:* AND !state_field:Active', array(
523523
'!date_field' => $date_field,
524524
'!state_field' => variable_get('islandora_oai_solr_state_field', 'fgs_state_s'),
525-
)));
525+
)), $params);
526526
$qp->executeQuery(FALSE);
527527
$result = reset($qp->islandoraSolrResult['response']['objects']);
528-
$earliest_datestamp = $result['solr_doc'][$date_field];
528+
$timestamp = strtotime($result['solr_doc'][$date_field]);
529+
$earliest_datestamp = gmdate('Y-m-d\TH:i:s\Z', $timestamp);
529530
break;
530531

531532
}

0 commit comments

Comments
 (0)