1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #6923 from AlanCoding/datetime_warning

fix datetime warning
This commit is contained in:
Alan Rominger 2017-07-07 13:32:57 -04:00 committed by GitHub
commit bd07bec813

View File

@ -10,7 +10,6 @@ import os
import os.path
from collections import OrderedDict
from StringIO import StringIO
from datetime import datetime
# Django
from django.conf import settings
@ -376,7 +375,7 @@ class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique, Notificatio
fields = self._get_unified_jt_copy_names()
unified_jt = copy_model_by_class(self, unified_jt_class, fields, {})
time_now = datetime.now()
time_now = now()
unified_jt.name = unified_jt.name.split('@', 1)[0] + ' @ ' + time_now.strftime('%I:%M:%S %p')
unified_jt.save()