From 97e50dff24475ab8e5aa6da4fcce787aaf712cf7 Mon Sep 17 00:00:00 2001 From: agessaman Date: Tue, 4 Aug 2026 14:59:46 -0700 Subject: [PATCH] fix(tests): update timezone handling in test_dashboard_stats.py - Changed the timezone handling in the test from UTC to timezone.utc for improved clarity and consistency in datetime operations. --- tests/test_dashboard_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_dashboard_stats.py b/tests/test_dashboard_stats.py index 7d2a712..5b5af61 100644 --- a/tests/test_dashboard_stats.py +++ b/tests/test_dashboard_stats.py @@ -13,7 +13,7 @@ import sqlite3 import time from configparser import ConfigParser from contextlib import closing -from datetime import UTC, datetime, timedelta +from datetime import datetime, timedelta, timezone from unittest.mock import patch import pytest @@ -463,7 +463,7 @@ class TestRollupCorrectness: time.tzset() try: # 03:00 UTC is 20:00 the previous day in Los Angeles. - utc_moment = datetime(2026, 7, 29, 3, 0, tzinfo=UTC) + utc_moment = datetime(2026, 7, 29, 3, 0, tzinfo=timezone.utc) local_date = utc_moment.astimezone().strftime("%Y-%m-%d") assert local_date == "2026-07-28", "fixture assumes a UTC-7/8 offset"