from datetime import datetime


def convert_time(y):
    """Convert time string and reformat

    :param str y: Time string to convert

    :return: Time string
    :rtype: datetime
    """

    time = datetime.strptime(y, '%H:%M:%S').time()

    return time