from datetime import datetime


def datetime_from_string(dt_string):
    """
    Converts string to datetime object

    :param dt_string: datetime string
    :type dt_string: str
    :return: datetime object
    :rtype: datetime
    """
    return datetime.strptime(
        dt_string.split("+")[0].split("Z")[0], "%Y-%m-%dT%H:%M:%S"
    )