def convert(self, value):
        if value is None:
            return None

        if isinstance(value, six.string_types):
            try:
                year, month, day = value[:10].split('-')
                hour, minute, second = value[10:18].split(':')

                return make_aware(datetime_safe.datetime(int(year), int(month), int(day), int(hour), int(minute), int(second)))
            except __HOLE__:
                raise ApiFieldError("Datetime provided to '%s' field doesn't appear to be a valid datetime string: '%s'" % (self.instance_name, value))

        return value
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/fields.py/DateTimeField.convert