Skip to content

Commit c1409a4

Browse files
committed
fix: replace timezone.utc with datetime.timezone.utc
1 parent 5436d63 commit c1409a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

easyaudit/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import unicode_literals
22

3+
import datetime as dt
34
from uuid import UUID
45

56
from django.conf import settings
@@ -25,7 +26,7 @@ def get_field_value(obj, field):
2526
try:
2627
value = field.to_python(getattr(obj, field.name, None))
2728
if value is not None and settings.USE_TZ and not timezone.is_naive(value):
28-
value = timezone.make_naive(value, timezone=timezone.utc)
29+
value = timezone.make_naive(value, timezone=dt.timezone.utc)
2930
except ObjectDoesNotExist:
3031
value = field.default if field.default is not NOT_PROVIDED else None
3132
else:

0 commit comments

Comments
 (0)