Skip to content

Commit

Permalink
chore: Replace deprecated utcnow()
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 11, 2023
1 parent e93d95a commit 1d4e296
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
import csv
import datetime
import json
import os
import re
from collections import defaultdict
from datetime import datetime, timedelta

import click
import requests
Expand Down Expand Up @@ -262,9 +262,9 @@ def github_activity(user, days, start, end):
end += "T23:59:59Z"

if not start and days:
start = (datetime.utcnow() - timedelta(days=days)).strftime("%Y-%m-%dT%H:%M:%SZ")
start = (datetime.datetime.now(tz=datetime.UTC) - datetime.timedelta(days=days)).strftime("%Y-%m-%dT%H:%M:%SZ")
if not end:
end = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
end = datetime.datetime.now(tz=datetime.UTC).strftime("%Y-%m-%dT%H:%M:%SZ")

query = format_string.format(
queries='\n'.join(f' user{i}: user(login: "{login}") {{\n ...f\n }}''' for i, login in enumerate(user)),
Expand Down

0 comments on commit 1d4e296

Please sign in to comment.