From 1bdd8b2221ea51085a148c67167367c6686fa402 Mon Sep 17 00:00:00 2001 From: Jeff West Date: Tue, 27 Oct 2026 06:24:23 -0500 Subject: [PATCH] test: use canonical IANA timezone names (fix CI on runners without legacy tz aliases) --- src/project_x_py/client/base.py | 2 +- tests/client/test_base.py | 4 ++-- tests/realtime_data_manager/test_data_access_edge_cases.py | 2 +- .../realtime_data_manager/test_data_processing_edge_cases.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/project_x_py/client/base.py b/src/project_x_py/client/base.py index 4010fc5d..99706238 100644 --- a/src/project_x_py/client/base.py +++ b/src/project_x_py/client/base.py @@ -266,7 +266,7 @@ async def from_config_file( ... "api_url": "https://api.topstepx.com/api", ... "user_hub_url": "https://rtc.topstepx.com/hubs/user", ... "market_hub_url": "https://rtc.topstepx.com/hubs/market", - ... "timezone": "US/Central", + ... "timezone": "America/Chicago", ... } >>> with open("config.json", "w") as f: ... json.dump(config, f) diff --git a/tests/client/test_base.py b/tests/client/test_base.py index a3a91869..1dc12ef6 100644 --- a/tests/client/test_base.py +++ b/tests/client/test_base.py @@ -249,7 +249,7 @@ async def test_from_config_file(self): realtime_url="wss://file.realtime.com", user_hub_url="/file-userhub", market_hub_url="/file-markethub", - timezone="US/Pacific", + timezone="America/Los_Angeles", timeout_seconds=45, retry_attempts=4, retry_delay_seconds=1.5, @@ -286,7 +286,7 @@ async def test_from_config_file_with_account_name(self): realtime_url="wss://file.realtime.com", user_hub_url="/file-userhub", market_hub_url="/file-markethub", - timezone="US/Pacific", + timezone="America/Los_Angeles", timeout_seconds=45, retry_attempts=4, retry_delay_seconds=1.5, diff --git a/tests/realtime_data_manager/test_data_access_edge_cases.py b/tests/realtime_data_manager/test_data_access_edge_cases.py index 91cf7e0b..40de3e8f 100644 --- a/tests/realtime_data_manager/test_data_access_edge_cases.py +++ b/tests/realtime_data_manager/test_data_access_edge_cases.py @@ -347,7 +347,7 @@ async def test_get_bars_since_with_pytz_timezone_object(self): manager = MockDataAccessManager() # Use a pytz timezone that has localize method - est = pytz.timezone("US/Eastern") + est = pytz.timezone("America/New_York") manager.timezone = est base_time = est.localize(datetime(2023, 6, 15, 10, 30)) diff --git a/tests/realtime_data_manager/test_data_processing_edge_cases.py b/tests/realtime_data_manager/test_data_processing_edge_cases.py index bf3f563a..2f373ceb 100644 --- a/tests/realtime_data_manager/test_data_processing_edge_cases.py +++ b/tests/realtime_data_manager/test_data_processing_edge_cases.py @@ -562,7 +562,7 @@ async def test_calculate_bar_time_timezone_scenarios(self): manager = MockDataProcessingManager() # Test with pytz timezone (has localize method) - manager.timezone = pytz.timezone("US/Eastern") + manager.timezone = pytz.timezone("America/New_York") naive_timestamp = datetime(2023, 6, 15, 10, 30, 45) bar_time = manager._calculate_bar_time(naive_timestamp, 5, 2)