(contentline, allowSignatureMismatch=False)
Convert a contentline's value into a date or date-time.

    A variety of clients don't serialize dates with the appropriate VALUE
    parameter, so rather than failing on these (technically invalid) lines,
    if allowSignatureMismatch is True, try to parse both varieties.
Convert a contentline's value into a date or date-time.
Convert a contentline s value into a date or date - time .
def parseDtstart(contentline, allowSignatureMismatch=False):
    """
    Convert a contentline's value into a date or date-time.

    A variety of clients don't serialize dates with the appropriate VALUE
    parameter, so rather than failing on these (technically invalid) lines,
    if allowSignatureMismatch is True, try to parse both varieties.
    """
    tzinfo = getTzid(getattr(contentline, 'tzid_param', None))
    valueParam = getattr(contentline, 'value_param', 'DATE-TIME').upper()
    if valueParam == "DATE":
        return stringToDate(contentline.value)
    elif valueParam == "DATE-TIME":
        try:
            return stringToDateTime(contentline.value, tzinfo)
        except:
            if allowSignatureMismatch:
                return stringToDate(contentline.value)
            else:
                raise
def parseDtstart ( contentline , allowSignatureMismatch = False ) : tzinfo = getTzid ( getattr ( contentline , 'tzid_param' , None ) ) valueParam = getattr ( contentline , 'value_param' , 'DATE-TIME' ) . upper ( ) if valueParam == "DATE" : return stringToDate ( contentline . value ) elif valueParam == "DATE-TIME" : try : return stringToDateTime ( contentline . value , tzinfo ) except : if allowSignatureMismatch : return stringToDate ( contentline . value ) else : raise