def _time_from_string(start_time, end_time):
    """
    Get the time from  start and stop time in string form, times in seconds
    Auto swap start time and end time if start time is before end time
    """
    if len(start_time) > 5:
        start_time = start_time[-5::]
        end_time = end_time[-5::]
    sm, ss = start_time.split(':')
    em, es = end_time.split(':')
    st = int(sm)*60 + int(ss)
    et = int(em)*60 + int(es)
    if et < st:
        return et, st
    return st, et