#16745: Different times on fields with auto_now and auto_now_add
-------------------------------------+-------------------------------------
     Reporter:  kantntreiber@…       |                    Owner:
         Type:  Bug                  |  michaelmior
    Component:  Database layer       |                   Status:  new
  (models, ORM)                      |                  Version:  1.3
     Severity:  Normal               |               Resolution:
     Keywords:  auto_now,            |             Triage Stage:  Accepted
  auto_now_add, DateTimeField,       |      Needs documentation:  1
  DateField, field                   |  Patch needs improvement:  1
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by michaelmior):

 @aaugustin Would I be correct in understanding that
 {{{django.utils.timezone.localtime}}} performs the conversion to the
 default time zone?

 @kaaria Agreed that the transaction start time may be unreliable, but it
 should be roughly accurate. As far as I can tell, Django has no guarantees
 on the delta of these times from their actual values anyway. (Although
 perhaps calling the time {{{transaction_start}}} is a bit of a misnomer.)
 My concern with using `NOW()` from the database end is that it requires
 knowledge of the server's configured time zone, which I don't believe
 Django currently has. Correct me if I'm wrong.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16745#comment:5>
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.

Reply via email to