Problem handling timezones

From: "Claudio Lapidus" <clapidus(at)ta(dot)telecom(dot)com(dot)ar>
To: pgsql-general(at)postgresql(dot)org
Subject: Problem handling timezones
Date: 2003-01-15 19:33:13
Message-ID: OF8DEFC488.04BA760B-ON03256CAF.0055A565@telecom.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

We are experiencing an error while trying to insert a row containing a date
string including timezone information:

acctvoip=> select version();
version
----------------------------------------------------------------
PostgreSQL 7.3 on sparc-sun-solaris2.6, compiled by GCC 2.95.3
(1 row)

acctvoip=> create table test (testdate timestamp with time zone);
CREATE TABLE

acctvoip=> insert into test values ('12:34:08.689 ART Fri Jan 10 2003');
ERROR: Bad timestamp external representation '12:34:08.689 ART Fri Jan 10
2003'

acctvoip=> insert into test values ('12:34:08.689 AWT Fri Jan 10 2003');
INSERT 56150645 1

So the problem arises when we try to use ART, which is the usual symbol for
Argentina Time (GMT-3). AWT, which is described in the docs as "unknown",
works just fine.

Our problem is that we have a lot of data sources which are already
configured to use ART as their TZ, so it would be a real pain to change
them all.

FWIW, I browsed the source tree and found that "art" is already defined in
datetime.c and appears to be included:

$ grep -in '"ART"' /opt/pgsql/src/postgresql-7.3/src/backend/utils/adt/datetime.c
119: {"art", TZ, NEG(12)}, /* Argentina Time */

But it doesn't work, as shown above. Any hints?

thanks in advance,
cl.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ross J. Reedstrom 2003-01-15 20:07:41 Re: sort by relevance
Previous Message Isaías Cristiano Barroso 2003-01-15 18:59:29 Connections count