File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ def default(self, obj):
37
37
if timezone and timezone .is_aware (obj ):
38
38
raise ValueError ("JSON can't represent timezone-aware times." )
39
39
representation = obj .isoformat ()
40
- if obj .microsecond :
41
- representation = representation [:12 ]
42
40
return representation
43
41
elif isinstance (obj , datetime .timedelta ):
44
42
return six .text_type (total_seconds (obj ))
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def test_encode_time(self):
44
44
Tests encoding a timezone
45
45
"""
46
46
current_time = datetime .now ().time ()
47
- assert self .encoder .default (current_time ) == current_time .isoformat ()[: 12 ]
47
+ assert self .encoder .default (current_time ) == current_time .isoformat ()
48
48
49
49
def test_encode_time_tz (self ):
50
50
"""
You can’t perform that action at this time.
0 commit comments