Skip to content

Commit

Permalink
pkp/pkp-lib#10155 Fix PostgreSQL date format error in OAI
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jul 3, 2024
1 parent cd681ba commit d26cf80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/oai/ojs/OAIDAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ public function _getRecordsRecordSetQuery($setIds, $from, $until, $set, $submiss
->orWhere('dot.set_spec', 'like', $set . ':%');
})
->when($from, function ($query, $from) {
return $query->where('dot.date_deleted', '>=', $from);
return $query->where('dot.date_deleted', '>=', \DateTime::createFromFormat('U', $from));
})
->when($until, function ($query, $until) {
return $query->where('dot.date_deleted', '<=', $until);
return $query->where('dot.date_deleted', '<=', \DateTime::createFromFormat('U', $until));
})
->when($submissionId, function ($query, $submissionId) {
return $query->where('dot.data_object_id', '=', (int) $submissionId);
Expand Down

0 comments on commit d26cf80

Please sign in to comment.