﻿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
1794	DateTimeField with unique=True broken	public@…	Adrian Holovaty	"Using the DateTimeField with ""unique=True"" returns the following error, when inputting new values:

{{{
ProgrammingError at /django/admin/polls/poll/add/
ERROR: invalid input syntax for type timestamp with time zone: ""16:08"" SELECT ""polls_poll"".""id"",""polls_poll"".""question"",""polls_poll"".""pub_date"" FROM ""polls_poll"" WHERE (""polls_poll"".""pub_date"" = '16:08')
Request Method: 	POST
Request URL: 	http://db-projects.org:8000/django/admin/polls/poll/add/
Exception Type: 	ProgrammingError
Exception Value: 	ERROR: invalid input syntax for type timestamp with time zone: ""16:08"" SELECT ""polls_poll"".""id"",""polls_poll"".""question"",""polls_poll"".""pub_date"" FROM ""polls_poll"" WHERE (""polls_poll"".""pub_date"" = '16:08')
Exception Location: 	/usr/lib/python2.3/site-packages/django/db/backends/util.py in execute, line 12
}}}

The demonstration model:

{{{
class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published', unique=True)
    def __str__(self):
        return self.question
    class Admin:
        pass
}}}

It works without problems if I'm not using ""unique=True"".

SVN revision 2864
Postgresql 7.4.7
Python 2.3.5"	defect	closed	Core (Other)	dev	normal	worksforme			Unreviewed	0	0	0	0	0	0
