psycopg2.DataError

758 views
Skip to first unread message

jondbaker

unread,
Oct 30, 2012, 2:06:29 AM10/30/12
to django...@googlegroups.com
When I run 'python manage.py validate' the following error is returned:

psycopg2.DataError: invalid value for parameter "TimeZone": "UTC"


settings.py
TIME_ZONE = 'America/Denver'
USE_TZ = True

I'm using Django 1.4.2 with Postgres 9.1/PostGIS on OSX.

To test, I went back and commented out my custom apps in INSTALLED_APPS, but the error is still there. If I set USE_TZ to False, then the error becomes:
psycopg2.DataError: invalid value for parameter "TimeZone": "America/Denver"

Tom Evans

unread,
Oct 30, 2012, 6:53:03 AM10/30/12
to django...@googlegroups.com
Postgres uses your OS's zoneinfo information, which for some reason is
missing on your OS X install.

You would probably have more luck getting an explanation on the
postrgresql mailing lists. To reproduce without django, open a
database shell ("python manage.py dbshell" is an easy way) and type in
"SET TIME ZONE 'UTC';".

Cheers

Tom

Jonathan Baker

unread,
Oct 30, 2012, 10:57:48 AM10/30/12
to django...@googlegroups.com
Thanks for the info Tom! I'll head over to their ML. Cheers.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Jonathan D. Baker
Developer
http://jonathandbaker.com

Reply all
Reply to author
Forward
0 new messages