summaryrefslogtreecommitdiff
path: root/service/pixelated/adapter/search
diff options
context:
space:
mode:
Diffstat (limited to 'service/pixelated/adapter/search')
-rw-r--r--service/pixelated/adapter/search/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/adapter/search/__init__.py b/service/pixelated/adapter/search/__init__.py
index e137b392..3ec6532b 100644
--- a/service/pixelated/adapter/search/__init__.py
+++ b/service/pixelated/adapter/search/__init__.py
@@ -30,6 +30,7 @@ from whoosh.writing import AsyncWriter
from whoosh import sorting
from pixelated.support.functional import unique, to_unicode
import traceback
+from pixelated.support import date
class SearchEngine(object):
@@ -128,7 +129,7 @@ class SearchEngine(object):
index_data = {
'sender': self._empty_string_to_none(header.get('from', '')),
'subject': self._empty_string_to_none(header.get('subject', '')),
- 'date': self._format_utc_integer(header.get('date', '')),
+ 'date': self._format_utc_integer(header.get('date', date.mail_date_now())),
'to': self._format_recipient(header, 'to'),
'cc': self._format_recipient(header, 'cc'),
'bcc': self._format_recipient(header, 'bcc'),