def time_str_to_seconds(time):
    """Convert a time intervall specified as a string ``dd:hh:mm:ss'`` into seconds.

    Accepts both ',' and ':' as separators."""
    intervals = [1, 60, 60*60, 60*60*24]
    return sum(iv*int(t) for iv, t in zip(intervals, reversed(time.replace('-', ':').split(':'))))