|
9 | 9 | from datetime import date, datetime, timedelta
|
10 | 10 |
|
11 | 11 | import pytz
|
| 12 | +from django.conf import settings |
12 | 13 | from django.contrib import messages
|
13 | 14 | from django.contrib.auth import login
|
14 | 15 | from django.contrib.auth.forms import SetPasswordForm
|
|
41 | 42 | from .decorators import require_ajax
|
42 | 43 | from .messages_ import passwd_error, passwd_set_successfully
|
43 | 44 | from .services import get_appointments_and_slots, get_available_slots_for_staff
|
44 |
| -from .settings import (APPOINTMENT_PAYMENT_URL, APPOINTMENT_THANK_YOU_URL, APP_TIME_ZONE) |
| 45 | +from .settings import (APPOINTMENT_PAYMENT_URL, APPOINTMENT_THANK_YOU_URL) |
45 | 46 | from .utils.date_time import convert_str_to_date, convert_str_to_time
|
46 | 47 | from .utils.error_codes import ErrorCode
|
47 | 48 | from .utils.json_context import get_generic_context_with_extra, json_response
|
@@ -96,7 +97,7 @@ def get_available_slots_ajax(request):
|
96 | 97 | # Check if the selected_date is today and filter out past slots
|
97 | 98 | if selected_date == date.today():
|
98 | 99 | # Get the current time in EDT timezone
|
99 |
| - current_time_edt = datetime.now(pytz.timezone(APP_TIME_ZONE)).time() |
| 100 | + current_time_edt = datetime.now(pytz.timezone(settings.TIME_ZONE)).time() |
100 | 101 | available_slots = [slot for slot in available_slots if convert_str_to_time(slot) > current_time_edt]
|
101 | 102 |
|
102 | 103 | custom_data['available_slots'] = available_slots
|
|
0 commit comments