From 69ba5a020d521e0efbd44890bcc3b78a33482124 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 26 Jun 2012 12:23:45 +0200 Subject: [PATCH] Fix #752 date search --- lib/classes/searchEngine/options.class.php | 4 ++-- templates/web/prod/index.html.twig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/classes/searchEngine/options.class.php b/lib/classes/searchEngine/options.class.php index 681beb9fd2..2c37d499f6 100644 --- a/lib/classes/searchEngine/options.class.php +++ b/lib/classes/searchEngine/options.class.php @@ -356,7 +356,7 @@ class searchEngine_options implements Serializable public function set_min_date($min_date) { if ( ! is_null($min_date) && trim($min_date) !== '') { - $this->date_min = DateTime::createFromFormat('d/m/Y H:i:s', $min_date . ' 00:00:00'); + $this->date_min = DateTime::createFromFormat('Y/m/d H:i:s', $min_date . ' 00:00:00'); } return $this; @@ -379,7 +379,7 @@ class searchEngine_options implements Serializable public function set_max_date($max_date) { if ( ! is_null($max_date) && trim($max_date) !== '') { - $this->date_max = DateTime::createFromFormat('d/m/Y H:i:s', $max_date . ' 23:59:59'); + $this->date_max = DateTime::createFromFormat('Y/m/d H:i:s', $max_date . ' 23:59:59'); } return $this; diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index a56f0d1093..f0173eedb4 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -445,7 +445,7 @@