diff --git a/rest_framework_simplejwt/utils.py b/rest_framework_simplejwt/utils.py index 48e950ad6..f1c4d3ae3 100644 --- a/rest_framework_simplejwt/utils.py +++ b/rest_framework_simplejwt/utils.py @@ -1,14 +1,14 @@ from calendar import timegm -from datetime import datetime +from datetime import datetime, timezone from django.conf import settings from django.utils.functional import lazy -from django.utils.timezone import is_naive, make_aware, utc +from django.utils.timezone import is_naive, make_aware def make_utc(dt): if settings.USE_TZ and is_naive(dt): - return make_aware(dt, timezone=utc) + return make_aware(dt, timezone=timezone.utc) return dt