#16745: Different times on fields with auto_now and auto_now_add -------------------------------------+------------------------------------- Reporter: | Owner: nobody kantntreiber@… | Status: new Type: Bug | Component: Database layer Milestone: | (models, ORM) Version: 1.3 | Severity: Normal Resolution: | Keywords: auto_now, Triage Stage: Accepted | auto_now_add, DateTimeField, Needs documentation: 0 | DateField, field Patch needs improvement: 0 | Has patch: 0 UI/UX: 0 | Needs tests: 0 | Easy pickings: 0 -------------------------------------+------------------------------------- Changes (by akaariai):
* needs_better_patch: => 0 * needs_docs: => 0 * needs_tests: => 0 * stage: Unreviewed => Accepted Comment: Accepted because, yes, it would be nice if the times matched. However I believe this will not get fixed soon, as there isn't a trivial (as in one- liner) fix, and for most developers this doesn't have a high priority. Unless of course somebody interested in fixing this creates a clean patch with tests. To get me interested in this ticket, an approach which would go along the lines of: - Record transaction start time in Django (something like PostgreSQL now()) - Use that time in auto_now and auto_now_add In my opinion the approach is a good one because transaction start time has other uses than solving this ticket's problem, and it would be hopefully easy to solve this ticket's problem as a trivial one-liner as a side effect of having the transaction start time available. In addition, the transaction start time would make all objects saved in one transaction have the same time. Then again, I don't know if core developers would be interested in this approach... -- Ticket URL: <https://code.djangoproject.com/ticket/16745#comment:1> 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 this group at http://groups.google.com/group/django-updates?hl=en.