From 92f26a606691657ed0b059a05a62cf6cf1b48018 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Thu, 23 Jan 2020 16:46:03 +0100
Subject: [PATCH] FEAT #11882 TIME 0:05 filter date with date time

---
 src/app/history/controllers/BatchHistoryController.php | 4 ++--
 src/app/history/controllers/HistoryController.php      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/app/history/controllers/BatchHistoryController.php b/src/app/history/controllers/BatchHistoryController.php
index c4572130adb..b846e9b6698 100755
--- a/src/app/history/controllers/BatchHistoryController.php
+++ b/src/app/history/controllers/BatchHistoryController.php
@@ -43,11 +43,11 @@ class BatchHistoryController
 
         if (!empty($queryParams['startDate'])) {
             $where[] = 'event_date > ?';
-            $data[] = date('Y-m-d H:i:s', $queryParams['startDate']);
+            $data[] = $queryParams['startDate'];
         }
         if (!empty($queryParams['endDate'])) {
             $where[] = 'event_date < ?';
-            $data[] = date('Y-m-d H:i:s', $queryParams['endDate']);
+            $data[] = $queryParams['endDate'];
         }
         if (!empty($queryParams['modules'])) {
             $where[] = 'module_name in (?)';
diff --git a/src/app/history/controllers/HistoryController.php b/src/app/history/controllers/HistoryController.php
index 61af7a9dfc2..475e94d286d 100755
--- a/src/app/history/controllers/HistoryController.php
+++ b/src/app/history/controllers/HistoryController.php
@@ -69,11 +69,11 @@ class HistoryController
 
         if (!empty($queryParams['startDate'])) {
             $where[] = 'event_date > ?';
-            $data[] = date('Y-m-d H:i:s', $queryParams['startDate']);
+            $data[] = $queryParams['startDate'];
         }
         if (!empty($queryParams['endDate'])) {
             $where[] = 'event_date < ?';
-            $data[] = date('Y-m-d H:i:s', $queryParams['endDate']);
+            $data[] = $queryParams['endDate'];
         }
 
         $eventTypes = [];
-- 
GitLab