#29600: Remove usage of django.utils.datetime_safe where possible
-------------------------------------+-------------------------------------
Reporter: Tim | Owner: Tim Graham
Graham |
Type: | Status: assigned
Cleanup/optimization |
Component: Core | Version: master
(Other) |
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
`django.utils.datetime_safe` was added in #1443 to overcome limitations in
Python 2.7 where `strftime()` doesn't support dates with year < 1900. That
issue is fixed in Python 3, but an issue remains where the result of
`strftime('%Y')` [https://bugs.python.org/issue13305 isn't consistent]
across all platforms. That issue was worked around in #12524.
`strftime()` is no longer used in the JSON serializer as of
9b1cb755a28f020e27d4268c214b25315d4de42e, so using `datetime_safe()` is
obsolete there.
If we remove `dateteime_safe` usage in migrations (it's need is
questionable), that would fix #29595.
--
Ticket URL: <https://code.djangoproject.com/ticket/29600>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.392be37c485812959e4ca8205c00fc4c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.