fix: issue in javascript timezones

This commit is contained in:
0Pranav 2019-12-11 15:02:23 +05:30
parent 797481f9d5
commit d3605d2354
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ function get_timeslot_div_layout(timeslot) {
timeslot_div.classList.add('unavailable')
}
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);
return timeslot_div
}

View File

@ -90,7 +90,7 @@ def get_available_slots_between(query_start_time, query_end_time, settings):
@frappe.whitelist(allow_guest=True)
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)
# Strip tzinfo from datetime objects since it's handled by the doctype
scheduled_time = scheduled_time.replace(tzinfo = None)