mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
fix: issue in javascript timezones
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user