Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use timezone aware 'now()' #566

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conda_forge_webservices/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import requests
import github
from datetime import datetime
from datetime import datetime, timezone

import conda_forge_webservices.linting as linting
import conda_forge_webservices.feedstocks_service as feedstocks_service
Expand Down Expand Up @@ -107,7 +107,7 @@ def print_rate_limiting_info_for_token(token):

# Compute time until GitHub API Rate Limit reset
gh_api_reset_time = gh.get_rate_limit().core.reset
gh_api_reset_time -= datetime.utcnow()
gh_api_reset_time -= datetime.now(timezone.utc)
msg = "{user} - remaining {remaining} out of {total}.".format(
remaining=gh_api_remaining,
total=gh_api_total, user=user,
Expand Down
Loading