I have a DateField in a Django 1.8 model, something like:
from django.db import models birth_date = models.DateField()
When it moves to the form, I return a “naive” object:
birth_date = the_form.cleaned_data['birth_date']
Printing the parent report in the debugger:
ipdb> birth_date datetime.date(2015, 6, 7)
Then, when this thing is stored in the database, I get a warning, as the documentation promises:
RuntimeWarning: SQLite received a naive datetime (2015-06-08 01:08:21.470719) while time zone support is active.
I read several articles about this, and I'm still confused. What should I do with this date?
Should I convert it to DateTime, make it hourly, and then go back to date? Should I make a DateTimeField model and abandon DateFields? What are the best practices here?
source share