def parse_tibia_time(tibia_time: str) -> datetime:
    'Gets a time object from a time string from tibia.com'
    tibia_time = tibia_time.replace(',', '').replace('&#160;', ' ')
    t = time.localtime()
    u = time.gmtime(time.mktime(t))
    local_utc_offset = (((timegm(t) - timegm(u)) / 60) / 60)
    tz = tibia_time[(- 4):].strip()
    try:
        t = datetime.strptime(tibia_time[:(- 4)].strip(), '%b %d %Y %H:%M:%S')
    except ValueError:
        log.error("parse_tibia_time: couldn't parse '{0}'".format(tibia_time))
        return None
    if (tz == 'CET'):
        utc_offset = 1
    elif (tz == 'CEST'):
        utc_offset = 2
    else:
        log.error("parse_tibia_time: unknown timezone for '{0}'".format(tibia_time))
        return None
    return (t + timedelta(hours=(local_utc_offset - utc_offset)))
Gets a time object from a time string from tibia.com
def parse_tibia_time(tibia_time: str) -> datetime:
    
    tibia_time = tibia_time.replace(',', ).replace('&#160;', ' ')
    t = time.localtime()
    u = time.gmtime(time.mktime(t))
    local_utc_offset = (((timegm(t) - timegm(u)) / 60) / 60)
    tz = tibia_time[(- 4):].strip()
    try:
        t = datetime.strptime(tibia_time[:(- 4)].strip(), '%b %d %Y %H:%M:%S')
    except ValueError:
        log.error("parse_tibia_time: couldn't parse '{0}'".format(tibia_time))
        return None
    if (tz == 'CET'):
        utc_offset = 1
    elif (tz == 'CEST'):
        utc_offset = 2
    else:
        log.error("parse_tibia_time: unknown timezone for '{0}'".format(tibia_time))
        return None
    return (t + timedelta(hours=(local_utc_offset - utc_offset)))