mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Always run enforce_timezone
This commit is contained in:
parent
cc23bbd832
commit
5ae9acea47
|
@ -1212,8 +1212,9 @@ class DateTimeField(Field):
|
|||
if output_format is None or isinstance(value, six.string_types):
|
||||
return value
|
||||
|
||||
value = self.enforce_timezone(value)
|
||||
|
||||
if output_format.lower() == ISO_8601:
|
||||
value = self.enforce_timezone(value)
|
||||
value = value.isoformat()
|
||||
if value.endswith('+00:00'):
|
||||
value = value[:-6] + 'Z'
|
||||
|
|
Loading…
Reference in New Issue
Block a user