#21300: Allow DateTimeField to return a naive datetime -----------------------------+--------------------------------- Reporter: brycegroff | Owner: nobody Type: New feature | Status: new Component: Forms | Version: master Severity: Normal | Keywords: forms DateTimeField Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------+--------------------------------- Currently if USE_TZ = True is set in the settings file, the forms.DateTimeField will always return a timezone aware datetime. I ran into a situation where I needed to have the datetime localized by another field on the form and needed to subclass the DateTimeField to overwrite the to_python method.
Maybe we could add a kwarg naive=False that would return a naive datetime in the cleaned_data if set? -- Ticket URL: <https://code.djangoproject.com/ticket/21300> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.686d3e07f8b7bff124d769f1b4c06b69%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.