Wednesday, November 28, 2018

Re: why created_at is greater than updated_at while inserting data in table

I think it has to do with django adding timezone.now() on each field with auto_now on it when saving to the databse.. the code for the first field will get timezone.now() slightly earlier then the second one 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c3ab68d5-386b-46a9-a7b3-bcb033e2ad3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment