def getTimesOfExperiment(expList, expId):
    """getTimesOfExperiment returns a list of the start and end time of the experiment given expId.

    Input:

        expList - the list of MadrigalExperiment objects

        expId - the experiment id

    Returns:

        a list of:
            (startyear,
            startmonth,
            startday,
            starthour,
            startmin,
            startsec,
            endyear,
            endmonth,
            endday,
            endhour,
            endmin,
            endsec)
    """
    retList = None
    for exp in expList:
        if exp.id == expId:
            retList = (exp.startyear, exp.startmonth, exp.startday, exp.
                starthour, exp.startmin, exp.startsec, exp.endyear, exp.
                endmonth, exp.endday, exp.endhour, exp.endmin, exp.endsec)
    return retList
