diff --git a/manage.py b/manage.py index 5e66182..f6ff33f 100755 --- a/manage.py +++ b/manage.py @@ -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 @@ -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)),