def time_to_min(time):
    """Convert time in this format hhmm into minutes passed sind 0000
    0830->510
    1345->825
    """
    minutes = time%100
    hours = time//100
    return hours*60+minutes