Skip to content

Commit

Permalink
Fix: set default timezone for datetime_start
Browse files Browse the repository at this point in the history
  • Loading branch information
“Simone committed Jan 26, 2025
1 parent ff1954b commit 35abf0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def parse_str_to_datetime(string):
def calculate_seconds_between_datetimes(datetime_start, datetime_str_end=None):
if not isinstance(datetime_start, datetime):
datetime_start = datetime.strptime(datetime_start, consts.DATETIME_FORMAT)
datetime_start = datetime_start.astimezone(consts.TZ_INFO)
datetime_start = datetime_start.astimezone()

if datetime_str_end:
datetime_end = datetime.strptime(datetime_str_end, consts.DATETIME_FORMAT)
Expand Down

0 comments on commit 35abf0f

Please sign in to comment.