Skip to content

Commit 549210b

Browse files
authored
Don't strip microseconds in JSON output. (#4256)
1 parent 7bfa5a9 commit 549210b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

rest_framework/utils/encoders.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ def default(self, obj):
2828
return force_text(obj)
2929
elif isinstance(obj, datetime.datetime):
3030
representation = obj.isoformat()
31-
if obj.microsecond:
32-
representation = representation[:23] + representation[26:]
3331
if representation.endswith('+00:00'):
3432
representation = representation[:-6] + 'Z'
3533
return representation

0 commit comments

Comments
 (0)