search: don't use naive datetime when updating index (#21027)
This commit is contained in:
parent
2efc30d897
commit
e66675775d
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in New Issue