search: don't use naive datetime when updating index (#21027)

This commit is contained in:
Frédéric Péters 2018-01-06 17:36:08 +01:00
parent 2efc30d897
commit e66675775d
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
from django.utils.timezone import now
from haystack.management.commands.update_index import Command as UpdateIndexCommand
@ -38,7 +38,7 @@ class Command(UpdateIndexCommand):
return super(Command, self).handle(**options)
def collect_external_links(self):
start_time = datetime.datetime.now()
start_time = now()
# assemble external links data
links = {}