Q: Django warning from Python while time zone support is active I have the following function:
import datetime
today = datetime.datetime.today
start_time = today().replace(hour=0, minute=0, second=0)
end_time = today().replace(hour=23, minute=59, second=59)

When saving my model:
    models.Action(
        created=today()
    )

I get the following warnings:
/Users/user/Documents/workspace/app/env/lib/python2.7/site-packages/django/db/models/fields/__init__.py:1474: RuntimeWarning: DateTimeField action.created received a naive datetime (2015-04-20 00:00:00.176591) while time zone support is active.
  RuntimeWarning)

/Users/user/Documents/workspace/app/env/lib/python2.7/site-packages/django/db/models/fields/__init__.py:1474: RuntimeWarning: DateTimeField action.created received a naive datetime (2015-04-20 23:59:59.176615) while time zone support is active.
  RuntimeWarning)

Could you explain why I get this warning, and how using my example I could  resolve it?
I'm using Django 1.8

A: today = datetime.datetime.today gives you a naive datetime object, it is not aware of a timezone. With timezone support active Django expects to get timezone aware datetime objects.
Use the utils from django.utils.timezone to get timezone aware objects:
https://docs.djangoproject.com/en/1.8/ref/utils/#module-django.utils.timezone
