Skip to content

Commit

Permalink
bugfixing
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Feb 19, 2025
1 parent 437fb98 commit 98b96eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/cron_wiim.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


date_format = "%a, %d %b %Y %H:%M:%S %z"
timezone = pytz.timezone("Europe/Berlin")

load_dotenv()
api_key = os.getenv('BENZINGA_API_KEY')
Expand Down Expand Up @@ -114,8 +115,7 @@ async def get_endpoint(session, symbol, con, semaphore):
res_list = []
res = ujson.loads(await response.text())

# Define New York timezone
ny_tz = pytz.timezone("America/New_York")


for item in res:
try:
Expand All @@ -129,7 +129,7 @@ async def get_endpoint(session, symbol, con, semaphore):
continue

# Convert the date to New York timezone
date_obj_ny = date_obj.astimezone(ny_tz)
date_obj_ny = date_obj.astimezone(timezone)

start_date_obj_utc = correct_weekday(date_obj)
start_date = start_date_obj_utc.strftime("%Y-%m-%d")
Expand Down

0 comments on commit 98b96eb

Please sign in to comment.