From 45dae73d1bc0e79375c1c471fdcf7d299f1d0d9b Mon Sep 17 00:00:00 2001 From: Maarten Rolefes Date: Wed, 11 Nov 2015 11:26:26 +0100 Subject: [PATCH] fixed date range criteria->to, added 23h 59m 59s to be able to select 1 of the same from and to date --- elementtypes/AuditLogElementType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/elementtypes/AuditLogElementType.php b/elementtypes/AuditLogElementType.php index 8b99802..038f73a 100644 --- a/elementtypes/AuditLogElementType.php +++ b/elementtypes/AuditLogElementType.php @@ -212,6 +212,7 @@ public function modifyElementsQuery(DbCommand $query, ElementCriteriaModel $crit // Check for date to if (!empty($criteria->to)) { + $criteria->to->add(new DateInterval('PT23H59M59S')); $query->andWhere(DbHelper::parseDateParam('auditlog.dateUpdated', '<= '.DateTimeHelper::formatTimeForDb($criteria->to), $query->params)); }