Also I would like to add, that even if the mysql column is a 0 fractional datetime column, and you send a datetime with some fraction in it (which is what django does right now), it won't handle it correctly (ie trim the fraction since the actual column has no fraction) but instead just try to match the fractional date. This makes me think if this might be a bug with mysql...
El viernes, 18 de diciembre de 2015, 21:52:43 (UTC-3), Cristiano Coelho escribió: > > Hello, > > After django 1.8, the mysql backend no longer strips microseconds. > This is giving me some issues when upgrading from 1.7 (I actually upgraded > to 1.9 directly), since date times are not stored with micro second > precision on mysql, but the queries are sent with them. > As I see it, my only option is to update all existing date time columns of > all existing tables, which is quite boring since there are many tables. > Is there a way I can explicitly set the model datetime precision? Will > this work with raw queries also? Could this be a global setting or monkey > patch? This new behaviour basically breaks any '=' query on date times, at > least raw queries (I haven't tested the others) since it sends micro > seconds which are not stripped down. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" 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]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/888f41c7-d2b8-4b86-b2cd-e5ff033f5cfa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
