fix: issue in javascript timezones
This commit is contained in:
parent
797481f9d5
commit
d3605d2354
@ -114,7 +114,7 @@ function get_timeslot_div_layout(timeslot) {
|
|||||||
timeslot_div.classList.add('unavailable')
|
timeslot_div.classList.add('unavailable')
|
||||||
}
|
}
|
||||||
timeslot_div.innerHTML = get_slot_layout(start_time);
|
timeslot_div.innerHTML = get_slot_layout(start_time);
|
||||||
timeslot_div.id = timeslot.time.substr(11, 20);
|
timeslot_div.id = timeslot.time.substring(11, 19);
|
||||||
timeslot_div.addEventListener('click', select_time);
|
timeslot_div.addEventListener('click', select_time);
|
||||||
return timeslot_div
|
return timeslot_div
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,7 +90,7 @@ def get_available_slots_between(query_start_time, query_end_time, settings):
|
|||||||
|
|
||||||
@frappe.whitelist(allow_guest=True)
|
@frappe.whitelist(allow_guest=True)
|
||||||
def create_appointment(date, time, tz, contact):
|
def create_appointment(date, time, tz, contact):
|
||||||
format_string = '%Y-%m-%d %H:%M:%S%z'
|
format_string = '%Y-%m-%d %H:%M:%S'
|
||||||
scheduled_time = datetime.datetime.strptime(date + " " + time, format_string)
|
scheduled_time = datetime.datetime.strptime(date + " " + time, format_string)
|
||||||
# Strip tzinfo from datetime objects since it's handled by the doctype
|
# Strip tzinfo from datetime objects since it's handled by the doctype
|
||||||
scheduled_time = scheduled_time.replace(tzinfo = None)
|
scheduled_time = scheduled_time.replace(tzinfo = None)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user