#18766: Models with datetime fields fail to save when date is below 1900 and USE_TZ is True -------------------------------+-------------------------------------- Reporter: void | Owner: aaugustin Type: Bug | Status: new Component: Uncategorized | Version: master Severity: Normal | Resolution: Keywords: timezone, tz | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by aaugustin): Indeed, this is a limitation of `django.utils.tzinfo.LocalTimezone`. Could you try installing `pytz` (as strongly recommeded by the docs)? If that fixes the problem, I'd lean towards a documentation fix rather than extending the huge hack that is `LocalTimezone`. Note that dates after 2038 are handled by returning incorrect data rather than crashing. I deeply dislike that, but I can't change it easily, for backwards-compatibility reasons. -- Ticket URL: <https://code.djangoproject.com/ticket/18766#comment:4> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.