From d89c952b0acb1beaee5f3308c4622a504972a497 Mon Sep 17 00:00:00 2001 From: ChuckBuilds <33324927+ChuckBuilds@users.noreply.github.com> Date: Thu, 24 Apr 2025 15:51:39 -0500 Subject: [PATCH] Fix datetime comparison in MLBUpcomingManager by making both datetimes timezone-aware --- src/mlb_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mlb_manager.py b/src/mlb_manager.py index 27679fc3..c5f1b9ee 100644 --- a/src/mlb_manager.py +++ b/src/mlb_manager.py @@ -3,7 +3,7 @@ import logging import requests import json from typing import Dict, Any, List, Optional -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone import os from PIL import Image, ImageDraw, ImageFont import numpy as np @@ -552,7 +552,7 @@ class MLBUpcomingManager(BaseMLBManager): if games: # Process games new_upcoming_games = [] - now = datetime.now() + now = datetime.now(timezone.utc) # Make timezone-aware upcoming_cutoff = now + timedelta(hours=24) logger.info(f"Looking for games between {now} and {upcoming_cutoff}")