Re: TIMESTAMP WITHOUT TIME ZONE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TIMESTAMP WITHOUT TIME ZONE
Дата
Msg-id 22158.1166222115@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TIMESTAMP WITHOUT TIME ZONE  (Richard Troy <rtroy@ScienceTools.com>)
Список pgsql-general
Richard Troy <rtroy@ScienceTools.com> writes:
> That said, nobody has yet assured me that when I give a timestamp I get it
> back unmolested.

Well, as far as the backend is concerned you do get it back unmolested
(up to the limits of float roundoff error, if you use float timestamps):
  * unconditionally for timestamp without timezone;
  * if your TimeZone is the same as it was on insert, for timestamp
    with timezone.  (If you change the timezone setting you'll get a
    suitably rotated value, and no that's not a bug.)  Also you have
    to be careful not to pass in a nonexistent or ambiguous value during
    DST changes, else you might get an adjusted value back.

If you always run with TimeZone = GMT then there's effectively no
difference between timestamp with and without time zone.

Now the original context of this thread was what happens with the JDBC
driver, and that I'm not sure about --- they have a problem because they
have to map both types to the same Java type, and it doesn't fit real
well.  But you'd be better off asking on pgsql-jdbc if you want the gory
details about that.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: TIMESTAMP WITHOUT TIME ZONE
Следующее
От: "Brandon Aiken"
Дата:
Сообщение: Re: TIMESTAMP WITHOUT TIME ZONE