def METHOD_NAME(self, value: str):
    """
    Parse ISO datetime from query string.
    Also accepts legacy format 'DD-MM-YY-HH-MM-SS'
    """
    if re.match(r"^\d{2}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}$", value):
        return timezone.datetime.strptime(value, "%d-%m-%y-%H-%M-%S")
    parsed = dateparse.METHOD_NAME(value)
    if parsed is None:
        raise ValueError(f'Failed to parse "{value}" as datetime')
    return parsed