mirror of https://github.com/zulip/zulip.git
Replace timezone.make_aware with timezone_make_aware.
This commit is contained in:
parent
6ddee006bd
commit
c4f0fa97a8
|
@ -6,7 +6,7 @@ from boto.s3.connection import S3Connection
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import connection
|
from django.db import connection
|
||||||
from django.forms.models import model_to_dict
|
from django.forms.models import model_to_dict
|
||||||
from django.utils import timezone
|
from django.utils.timezone import make_aware as timezone_make_aware
|
||||||
from django.utils.timezone import utc as timezone_utc
|
from django.utils.timezone import utc as timezone_utc
|
||||||
from django.utils.timezone import is_naive as timezone_is_naive
|
from django.utils.timezone import is_naive as timezone_is_naive
|
||||||
from django.db.models.query import QuerySet
|
from django.db.models.query import QuerySet
|
||||||
|
@ -181,7 +181,7 @@ def floatify_datetime_fields(data, table):
|
||||||
continue
|
continue
|
||||||
if timezone_is_naive(orig_dt):
|
if timezone_is_naive(orig_dt):
|
||||||
logging.warning("Naive datetime:", item)
|
logging.warning("Naive datetime:", item)
|
||||||
dt = timezone.make_aware(orig_dt)
|
dt = timezone_make_aware(orig_dt)
|
||||||
else:
|
else:
|
||||||
dt = orig_dt
|
dt = orig_dt
|
||||||
utc_naive = dt.replace(tzinfo=None) - dt.utcoffset()
|
utc_naive = dt.replace(tzinfo=None) - dt.utcoffset()
|
||||||
|
|
Loading…
Reference in New Issue