Skip to content

Commit

Permalink
fix: use tz aware timestamp for requested_password_reset_at (#20941)
Browse files Browse the repository at this point in the history
use tz aware timestamp for requested_password_reset_at
  • Loading branch information
raquelmsmith authored Mar 14, 2024
1 parent 0691130 commit e7881c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/api/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def create(self, validated_data):
user = None

if user:
user.requested_password_reset_at = datetime.datetime.now()
user.requested_password_reset_at = datetime.datetime.now(datetime.timezone.utc)
user.save()
token = password_reset_token_generator.make_token(user)
send_password_reset(user.id, token)
Expand Down

0 comments on commit e7881c6

Please sign in to comment.