def parse_time(value):
    """Parse a time interval string into a floating point seconds value.

    Supported formats include:
               ss      (seconds)
               ss.dd   (seconds with decimals)
            mm:ss      (minutes and seconds)
            mm:ss.dd   (minutes and seconds with decimals)
         hh:mm:ss      (hours, minutes and seconds)
         hh:mm:ss.dd   (hours, minutes and seconds with decimals)
      dd:hh:mm:ss      (days,hours, minutes and seconds)
      dd:hh:mm:ss.dd   (days,hours, minutes and seconds with decimals)
    """
    # allow an empty value
    if value == '':
        return 0

    # seconds should be always 0
    # minutes should be always 1 ecc.
    parts = value.split(':')
    if len(parts) > 4:
        raise ValueError('The provided time does not respect the supported formats: SS, MM:SS, HH:MM:SS, DD:HH:MM:SS.')

    parts.reverse()
    seconds = float(parts[0])

    # minutes (mm:ss)
    if len(parts) > 1:
        seconds += int(parts[1]) * 60

    # hours (hh:mm:ss)
    if len(parts) > 2:
        seconds += float(parts[2]) * 3600

    # days (dd:hh:mm:ss)
    if len(parts) > 3:
        seconds += float(parts[3]) * 86400

    return seconds