mirror of
https://github.com/Hopiu/xapian-haystack.git
synced 2026-04-25 17:14:51 +00:00
Fixed #126 - Deprecates microsecond indexing.
This commit is contained in:
parent
b623ea2556
commit
1c3a7ff4a5
2 changed files with 4 additions and 11 deletions
|
|
@ -453,7 +453,6 @@ class XapianSearchBackendTestCase(HaystackBackendTestCase, TestCase):
|
|||
self.assertEqual(_marshal_value(datetime.datetime(2009, 5, 9, 16, 14)), '20090509161400')
|
||||
self.assertEqual(_marshal_value(datetime.datetime(2009, 5, 9, 0, 0)), '20090509000000')
|
||||
self.assertEqual(_marshal_value(datetime.datetime(1899, 5, 18, 0, 0)), '18990518000000')
|
||||
self.assertEqual(_marshal_value(datetime.datetime(2009, 5, 18, 1, 16, 30, 250)), '20090518011630000250')
|
||||
|
||||
def test_build_schema(self):
|
||||
search_fields = connections['default'].get_unified_index().all_searchfields()
|
||||
|
|
|
|||
|
|
@ -1342,16 +1342,10 @@ def _marshal_date(d):
|
|||
|
||||
|
||||
def _marshal_datetime(dt):
|
||||
if dt.microsecond:
|
||||
return '%04d%02d%02d%02d%02d%02d%06d' % (
|
||||
dt.year, dt.month, dt.day, dt.hour,
|
||||
dt.minute, dt.second, dt.microsecond
|
||||
)
|
||||
else:
|
||||
return '%04d%02d%02d%02d%02d%02d' % (
|
||||
dt.year, dt.month, dt.day, dt.hour,
|
||||
dt.minute, dt.second
|
||||
)
|
||||
return '%04d%02d%02d%02d%02d%02d' % (
|
||||
dt.year, dt.month, dt.day, dt.hour,
|
||||
dt.minute, dt.second
|
||||
)
|
||||
|
||||
|
||||
class XapianEngine(BaseEngine):
|
||||
|
|
|
|||
Loading…
Reference in a new issue