#24497: Form datetime inconsistent handling
-------------------------------+--------------------------
Reporter: riklaunim | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 1.7
Severity: Normal | Keywords: microseconds
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------
I've stumbled upon an yet another inconsistency in Django forms with
microseconds handling.
I have a model with DateTime field set with timezone.now(). In a form this
date is passed as hidden so that before save it can be verified that the
content didn't changed during moderation. The problem is that
timezone.now() sets microseconds, while datetime returned in form_valid is
without microseconds and thus can't be used for direct lookup on that
model field (and that what hurts).
--
Ticket URL: <https://code.djangoproject.com/ticket/24497>
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.47771273e065f2b5471cf32375a952dd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.