From: Michael M Slusarz Date: Fri, 14 Jan 2011 18:33:34 +0000 (-0700) Subject: Bug #9513: Cast to timestamp for DateTime X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bf970d10f3c00d240d21bf02fc00f41e84e19251;p=horde.git Bug #9513: Cast to timestamp for DateTime --- diff --git a/imp/lib/Search/Element/Date.php b/imp/lib/Search/Element/Date.php index 7b78b65a0..11ab35084 100644 --- a/imp/lib/Search/Element/Date.php +++ b/imp/lib/Search/Element/Date.php @@ -44,7 +44,8 @@ class IMP_Search_Element_Date extends IMP_Search_Element */ public function createQuery($mbox, $queryob) { - $date = new DateTime($this->_data->d); + // Cast to timestamp - see PHP Bug #40171/Horde Bug #9513 + $date = new DateTime('@' . $this->_data->d); $queryob->dateSearch($date, ($this->_data->t == self::DATE_ON) ? Horde_Imap_Client_Search_Query::DATE_ON : (($this->_data->t == self::DATE_BEFORE) ? Horde_Imap_Client_Search_Query::DATE_BEFORE : Horde_Imap_Client_Search_Query::DATE_SINCE)); return $queryob;