Blog (or) Scribble Pad

Django (Python): RuntimeWarning: SQLite received a naive datetime while time zone support is active

Problem: when running the command,

C:\Users\What\Dropbox\Django\mysite>python manage.py shell

encountered a warning followed by a lengthy traceback from Python interpreter:

C:\python27\lib\site-packages\django\db\backends\sqlite3\base.py:58: RuntimeWarning: SQLite received a naive datetime (2014-05-27 02:45:18.709000) while time zone support is active. 
....
.....
....

Solution that worked for me: Opened the settings.py file from the current project and replaced the TIME_ZONE variable,

TIME_ZONE = 'UTC'

to

TIME_ZONE = timezone.now()

and added the line


from django.utils import timezone 


at the top of the file to import the timezone.