def _to_python(self, value):
        if isinstance(value, util.strbase):
            try:
                value = value.split('.', 1)[0] # strip out microseconds
                value = value.rstrip('Z') # remove timezone separator
                value = datetime(*strptime(value, '%Y-%m-%dT%H:%M:%S')[:6])
            except __HOLE__:
                raise ValueError('Invalid ISO date/time %r' % value)
        return value
dataset/ETHPy150Open djc/couchdb-python/couchdb/mapping.py/DateTimeField._to_python