Closed smithumble closed 2 years ago
Probably should use django timezone.now()
def now():
"""
Return an aware or naive datetime.datetime, depending on settings.USE_TZ.
"""
return datetime.now(tz=utc if settings.USE_TZ else None)
like:
'expires_in': (
access_token.expires - timezone.now()
).total_seconds(),
@smithumble thank you so much for your issue and PR. I promise I will test it myself later today. Perhaps even launch a new release tag.
@smithumble you can find the newest release with your changes here: https://pypi.org/project/drf-social-oauth2/. Thank you for your contribution.
Got an error with django setting
USE_TZ = False
Related code snipet