def etime_to_secs(etime):
    """Parsing etimes is rougher than it should be."""
    seconds = 0
    etime = etime.split('-')
    if len(etime) == 2:
        seconds += int(etime[0]) * 24 * 60 * 60
        etime = etime[1]
    else:
        etime = etime[0]
    etime = etime.split(':')
    if len(etime) == 3:
        seconds += int(etime[0]) * 60 * 60
        mins, secs = etime[1:]
    else:
        mins, secs = etime
    seconds += 60 * int(mins) + int(secs)
    return seconds
