Tuesday, October 30, 2012

Re: psycopg2.DataError

Thanks for the info Tom! I'll head over to their ML. Cheers.

On Tue, Oct 30, 2012 at 4:53 AM, Tom Evans <tevans.uk@googlemail.com> wrote:
On Tue, Oct 30, 2012 at 6:06 AM, jondbaker <jonathandavidbaker@gmail.com> wrote:
> 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"
>

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

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@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

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

No comments:

Post a Comment