Returns datetime.datetime object.

def stringToDateTime(s, tzinfo=None):
    """Returns datetime.datetime object."""
    try:
        year = int(s[0:4])
        month = int(s[4:6])
        day = int(s[6:8])
        hour = int(s[9:11])
        minute = int(s[11:13])
        second = int(s[13:15])
        if len(s) > 15:
            if s[15] == 'Z':
                tzinfo = utc
    except:
        raise ParseError("'%s' is not a valid DATE-TIME" % s)
    year = year and year or 2000
    return datetime.datetime(year, month, day, hour, minute, second, 0, tzinfo)