Skip to content

Commit

Permalink
fix: replace timezone.utc with datetime.timezone.utc
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoettle authored and jheld committed Mar 20, 2023
1 parent 5436d63 commit fed129b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions easyaudit/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import unicode_literals

from uuid import UUID
import datetime as dt

from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
Expand All @@ -25,7 +25,7 @@ def get_field_value(obj, field):
try:
value = field.to_python(getattr(obj, field.name, None))
if value is not None and settings.USE_TZ and not timezone.is_naive(value):
value = timezone.make_naive(value, timezone=timezone.utc)
value = timezone.make_naive(value, timezone=dt.timezone.utc)
except ObjectDoesNotExist:
value = field.default if field.default is not NOT_PROVIDED else None
else:
Expand Down

0 comments on commit fed129b

Please sign in to comment.