ERROR: unrecognized time zone name: "UTC"

Lists: pgsql-general
From: Brad Ediger <brad(at)bradediger(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: unrecognized time zone name: "UTC"
Date: 2010-05-19 01:15:18
Message-ID: AANLkTilZcapwKGrjObrrd7qAf8Tz-Lx4jPMLyKRGdYZs@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I am experiencing this error trying to set the connection time zone to
UTC on PostgreSQL 8.4.4:

postgres=# set time zone 'UTC';
ERROR: unrecognized time zone name: "UTC"

I have read the documentation for timezone_abbreviations, and
everything looked in order, at least as far as my limited knowledge
takes me:

postgres=# show timezone_abbreviations;
timezone_abbreviations
------------------------
Default
(1 row)

$ grep UTC `pg_config --sharedir`/timezonesets/Default
UTC 0 # Coordinated Universal Time

Setting the time zone to 'CST6CDT' appears to work fine:

postgres=# set time zone 'CST6CDT';
SET

Is there something I'm doing wrong here? I have a slightly odd
configuration (Gentoo Prefix Portage on Mac OS X, with a custom
ebuild) so the problem may well be with my system setup. But I'd
appreciate any pointers folks may have as to where to troubleshoot.

Thanks!
-be


From: Brad Ediger <brad(at)bradediger(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: unrecognized time zone name: "UTC"
Date: 2010-05-19 02:11:35
Message-ID: AANLkTikJJJ5TCfnqESzR0KqNCbJJ3MNvZcuqZybK3Now@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Tue, May 18, 2010 at 8:15 PM, Brad Ediger <brad(at)bradediger(dot)com> wrote:
> I am experiencing this error trying to set the connection time zone to
> UTC on PostgreSQL 8.4.4:
>
>    postgres=# set time zone 'UTC';
>    ERROR:  unrecognized time zone name: "UTC"

Answered my own question -- it was my Prefix Portage install missing
the zoneinfo database ($EPREFIX/usr/share/zoneinfo/UTC). Working great
now.

-be