from typing import List
from datetime import datetime


def times_are_valid(times: List[str]) -> bool:
    """
    Verify if times are valid (both of them).
    If at least one of them is invalid, will return False.
    A time is valid when respect the pattern HH:MM and is on 24hrs format.
    :param times: A list with start time and end time.
                    Ex.: ['10:15','20:02']
    :return: True or False
    """
    valid_dates = False
    for time in times:
        try:
            datetime.strptime(time, '%H:%M')
            valid_dates = True
        except ValueError:
            valid_dates = False
            break
    return valid_dates