From 843ee5dca58c53e4e62bf1ad377e8e5cd3b9e9e2 Mon Sep 17 00:00:00 2001 From: Christopher Usher Date: Tue, 5 Nov 2024 16:43:50 -0800 Subject: [PATCH] Fixing incomplete changes to calculate_shift --- common/common/shifts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/common/shifts.py b/common/common/shifts.py index 8a7ba60..802f51d 100644 --- a/common/common/shifts.py +++ b/common/common/shifts.py @@ -79,7 +79,7 @@ def parse_shifts(shifts): return new_shifts -def calculate_shift(time, shifts, timezone): +def calculate_shift(time, shifts): """ Calculate what shift a time falls in. @@ -95,7 +95,7 @@ def calculate_shift(time, shifts, timezone): return shift[0] #since shifts are based on local times we have to worry about timezones for once - local_time = time.replace(tzinfo=UTC).astimezone(timezone) + local_time = time.replace(tzinfo=UTC).astimezone(shifts['timezone']) # do a more involved calculation to allow for non-integer start and end hours hour = local_time.hour + local_time.minute / 60 + local_time.second / 3600 for shift in shifts['repeating']: