projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6b4fff
)
Bug #9513: Cast to timestamp for DateTime
author
Michael M Slusarz
<slusarz@curecanti.org>
Fri, 14 Jan 2011 18:33:34 +0000
(11:33 -0700)
committer
Michael M Slusarz
<slusarz@curecanti.org>
Fri, 14 Jan 2011 18:33:34 +0000
(11:33 -0700)
imp/lib/Search/Element/Date.php
patch
|
blob
|
history
diff --git
a/imp/lib/Search/Element/Date.php
b/imp/lib/Search/Element/Date.php
index
7b78b65
..
11ab350
100644
(file)
--- 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;