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.
This commit is contained in:
agessaman
2026-08-04 14:59:46 -07:00
parent 7e68ed3dec
commit 97e50dff24
+2 -2
View File
@@ -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"