import time


def convert_from_html_time(html_time):
    """Converts times sent through html forms to dates suitable for the database
    html_time - Time of the format 9:00 AM
    returns number of minutes since 12:00 AM
    """
    parsed = time.strptime(html_time, "%I:%M %p")
    return parsed.tm_hour * 60 + parsed.tm_min