fix: revert use of dt.UTC to dt.tz.UTC

some instance still on python 3.9
This commit is contained in:
Iain Learmonth 2024-11-29 18:53:46 +00:00
parent 905bdd1a58
commit cdbf152f40
4 changed files with 10 additions and 10 deletions

View file

@ -2,7 +2,7 @@ import base64
import binascii
import logging
import re
from datetime import datetime, timedelta, UTC
from datetime import datetime, timedelta, timezone
from typing import Optional, List, Callable, Any, Type, Dict, Union, Literal
from flask import Blueprint, request, jsonify, abort
@ -182,7 +182,7 @@ def list_origins() -> ResponseReturnValue:
def list_mirrors() -> ResponseReturnValue:
filters = []
twenty_four_hours_ago = datetime.now(UTC) - timedelta(hours=24)
twenty_four_hours_ago = datetime.now(timezone.utc) - timedelta(hours=24)
status_filter = request.args.get('Status')
if status_filter:
if status_filter == "pending":