Skip to content

Commit 035c257

Browse files
committed
don't hardcode timezone in get_next_available_date_ajax
1 parent 711081a commit 035c257

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

appointment/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def get_available_slots_ajax(request):
9797

9898
# Check if the selected_date is today and filter out past slots
9999
if selected_date == date.today():
100-
# Get the current time in EDT timezone
101-
current_time_edt = datetime.now(pytz.timezone('Europe/Paris')).time()
100+
current_time_edt = datetime.now(pytz.timezone(settings.TIME_ZONE)).time()
102101
available_slots = [slot for slot in available_slots if convert_str_to_time(slot) > current_time_edt]
103102

104103
custom_data['available_slots'] = available_slots

0 commit comments

Comments
 (0)