diff --git a/load_testing/locustfile.py b/load_testing/locustfile.py index f24c5e3..504d688 100644 --- a/load_testing/locustfile.py +++ b/load_testing/locustfile.py @@ -1,5 +1,6 @@ import datetime import random +from zoneinfo import ZoneInfo import requests from locust import HttpUser, between, events, task @@ -96,7 +97,7 @@ def nearby_transit(self): @task(5) def stop_details(self): self.stop_id = random.choice(all_stop_ids) - self.client.get(f'/api/schedules?stop_ids={self.stop_id}&date_time={datetime.datetime.now().astimezone().replace(microsecond=0).isoformat()}' , name="/api/schedules",) + self.client.get(f'/api/schedules?stop_ids={self.stop_id}&date_time={datetime.datetime.now().astimezone(ZoneInfo("America/New_York")).replace(microsecond=0).isoformat()}' , name="/api/schedules",) self.client.get(f'/api/stop/map?stop_id={self.stop_id}', name = "/api/stop/map") if (