def formatTime(t):
    """Check if hour, minute, second variable has format hh, mm or ss if not change format.

    :param t: string time hh, mm or ss
    :return: string time in correct format eg. hh=02 instead of hh=2
    """
    if len(t) < 2:
        t = "0" + t

    return t