Problem handling timezones

Поиск
Список
Период
Сортировка
От Claudio Lapidus
Тема Problem handling timezones
Дата
Msg-id OF8DEFC488.04BA760B-ON03256CAF.0055A565@telecom.com.ar
обсуждение исходный текст
Ответы Re: Problem handling timezones  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.



В списке pgsql-general по дате отправления:

Предыдущее
От: Isaías Cristiano Barroso
Дата:
Сообщение: Connections count
Следующее
От: Tom Lane
Дата:
Сообщение: Re: postgres on a PDA