'Validate a value, and convert it into a timezone-naive
datetime.datetime object as necessary
@param value: the value to validate
@return: tuple (value, error)'

def __call__(self, value):

    if isinstance(value, basestring):
        val = value.strip()
        if ((len(val) > 5) and (val[(-5)] in ('+', '-')) and val[(-4):].isdigit()):
            (dtstr, utc_offset) = (val[0:(-5)].strip(), val[(-5):])
        else:
            (dtstr, utc_offset) = (val, None)
        dt = self.calendar.parse_datetime(dtstr, dtfmt=self.format, local=True)
        if (dt is None):
            dt_ = self.calendar.parse_date(dtstr)
            if (dt_ is None):
                return (value, self.error_message)
            dt = datetime.datetime.combine(dt_, datetime.datetime.min.time())
    elif isinstance(value, datetime.datetime):
        dt = value
        utc_offset = None
    elif isinstance(value, datetime.date):
        dt = datetime.datetime.combine(value, datetime.time(8, 0, 0))
        utc_offset = None
    else:
        return (value, self.error_message)
    if dt.tzinfo:
        offset = dt.tzinfo.utcoffset(dt)
        dt = dt.replace(tzinfo=None)
    else:
        offset = self.delta(utc_offset=utc_offset)
        if (not ((-86340) < offset < 86340)):
            return (val, self.offset_error)
        offset = datetime.timedelta(seconds=offset)
    dt_utc = (dt - offset)
    if ((self.minimum and (dt_utc < self.minimum)) or (self.maximum and (dt_utc > self.maximum))):
        return (dt_utc, self.error_message)
    return (dt_utc, None)
