﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24822	Autodetector crashes on add/removal of tzinfo from DateTimeField default	Camilo Ernesto Forero	nobody	"I wanted to add a default value to a DateTimeField, so I set {{{ default=datetime(2015, 7, 4, 8, 0 ) }}} as an argument. When I ran makemigrations/migrate, I got a warning about naive timezones. I read about it and decided to set it as {{{ default=datetime(2015, 7, 4, 8, 0, tzinfo=timezone.get_default_timezone() ) }}} (I imported django.utils.timezone) but when I tried to makemigrations and migrate I got an error {{{ can't compare offset-naive and offset-aware datetimes }}} from {{{old_field_dec != new_field_dec}}} in django.autodetector.py. 
To solve it I had to remove the default from the DateTimeField, migrate (got a warning again), add it again with the timezone enabled, and migrate again. That time it worked just fine.
It is worth noting that all of the fields currently in the database had their values already set, that I am using PostgreSQL and python 2.7.3"	Bug	closed	Documentation	1.8	Normal	invalid			Accepted	0	0	0	0	0	0
