mirror of
https://github.com/Hopiu/xapian-haystack.git
synced 2026-04-28 02:24:50 +00:00
use time.strptime for compatibility with python 2.4
This commit is contained in:
parent
abd5920645
commit
ad6b86e1da
1 changed files with 2 additions and 1 deletions
|
|
@ -17,6 +17,7 @@
|
|||
__author__ = 'David Sauve'
|
||||
__version__ = (1, 0, 0, 'beta')
|
||||
|
||||
import time
|
||||
import datetime
|
||||
import cPickle as pickle
|
||||
import os
|
||||
|
|
@ -642,7 +643,7 @@ class SearchBackend(BaseSearchBackend):
|
|||
day=result_date.day,
|
||||
)
|
||||
for n, facet_date in enumerate(facet_list):
|
||||
if result_date > datetime.datetime.strptime(facet_date[0], '%Y-%m-%dT%H:%M:%S'):
|
||||
if result_date > datetime.datetime(*(time.strptime(facet_date[0], '%Y-%m-%dT%H:%M:%S')[0:6])):
|
||||
facet_list[n] = (facet_list[n][0], (facet_list[n][1] + 1))
|
||||
break
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue