  
  
  class DateTimeField(Field):
      default_error_messages = {
          'invalid': _('Datetime has wrong format. Use one of these formats instead: {format}'),
          'date': _('Expected a datetime but got a date.'),
      }
      format = api_settings.DATETIME_FORMAT
      input_formats = api_settings.DATETIME_INPUT_FORMATS
      default_timezone = timezone.get_default_timezone() if settings.USE_TZ else None
  
 
</s> remove class DateTimeField(Field):
 </s> add class DateField(Field): </s> remove     format = api_settings.DATETIME_FORMAT
    input_formats = api_settings.DATETIME_INPUT_FORMATS
    default_timezone = timezone.get_default_timezone() if settings.USE_TZ else None
 </s> add     format = api_settings.DATE_FORMAT
    input_formats = api_settings.DATE_INPUT_FORMATS </s> remove     def __init__(self, format=empty, input_formats=None, default_timezone=None, *args, **kwargs):
 </s> add     def __init__(self, format=empty, input_formats=None, *args, **kwargs): </s> remove             return value.isoformat()
 </s> add             ret = value.isoformat()
            if ret.endswith('+00:00'):
                ret = ret[:-6] + 'Z'
            return ret </s> remove         if isinstance(value, datetime.datetime):
            value = value.time()
 </s> add         # Applying a `TimeField` to a datetime value is almost always
        # not a sensible thing to do, as it means naively dropping
        # any explicit or implicit timezone info.
        assert not isinstance(value, datetime.datetime), (
            'Expected a `time`, but got a `datetime`. Refusing to coerce, '
            'as this may mean losing timezone information. Use a custom '
            'read-only field and deal with timezone issues explicitly.'
        )
        'invalid': _('Date has wrong format. Use one of these formats instead: {format}'),
        'datetime': _('Expected a date but got a datetime.'),
  
  
  class DateTimeField(Field):
      default_error_messages = {
        'invalid': _('Date has wrong format. Use one of these formats instead: {format}'),
        'datetime': _('Expected a date but got a datetime.'),
        'invalid': _('Date has wrong format. Use one of these formats instead: {format}'),
        'datetime': _('Expected a date but got a datetime.'),
      }
      format = api_settings.DATETIME_FORMAT
      input_formats = api_settings.DATETIME_INPUT_FORMATS
      default_timezone = timezone.get_default_timezone() if settings.USE_TZ else None
  
keep keep keep keep replace replace keep keep keep keep keep
 Refuse to downcast from datetime to date or time 
rest_framework/fields.py