diff options
| author | Aaryan P <aaryanparik124@gmail.com> | 2026-05-22 01:32:01 +0530 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2026-06-01 10:34:38 +0200 |
| commit | ea9742c6d02edf64fc0969f21506f2048c976051 (patch) | |
| tree | f20c328aea70559a630addccb76e9941a8d01e14 /docs | |
| parent | 7711cceea646340e07fcee4cef8245f201b98211 (diff) | |
Fixed #37108 -- Made DjangoJSONEncoder consistently omit .000 microseconds.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/6.2.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/releases/6.2.txt b/docs/releases/6.2.txt index 1193f7a84d..3bafa4f583 100644 --- a/docs/releases/6.2.txt +++ b/docs/releases/6.2.txt @@ -256,6 +256,12 @@ Miscellaneous pollution vulnerability in the ``Array`` prototype was fixed in `ES5 <https://262.ecma-international.org/5.1/#sec-11.1.4>`_. +* :class:`~django.core.serializers.json.DjangoJSONEncoder` now omits the + millisecond component of serialized ``datetime.datetime`` and + ``datetime.time`` objects if they have zero milliseconds. For example, + ``datetime.datetime(2000, 1, 1, 0, 0, 0, 1)`` now serializes to + ``"2000-01-01T00:00:00"`` rather than ``"2000-01-01T00:00:00.000"``. + .. _deprecated-features-6.2: Features deprecated in 6.2 |
