Re: Timezone With Timestamp

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Timezone With Timestamp
Дата
Msg-id Pine.LNX.4.44.0208201804000.5257-100000@cm-lcon1-46-187.cm.vtr.net
обсуждение исходный текст
Ответ на Timezone With Timestamp  (Gavin Roy <gmr@justsportsusa.com>)
Ответы Re: Timezone With Timestamp  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Gavin Roy dijo:

> I know I'm missing something somewhere but I am using the data type
> timezone with timestamp and when I am retrieving the data while using
> the to_char function to format the timestamp, when I include the
> timezone ( to_char(t_timestamp, 'HH12:MM AM TZ') ) it is returning my
> local timezone and not the timezone of the record that inserted it.

Timestamps are stored in GMT and converted to the timezone the client is
currently in.

I think the easiest way to do what you want is to use timestamp without
time zone and store the timezone in a separate field.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"La realidad se compone de muchos sueños, todos ellos diferentes,
pero en cierto aspecto, parecidos..." (Yo, hablando de sueños eróticos)


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

Предыдущее
От: Gavin Roy
Дата:
Сообщение: Timezone With Timestamp
Следующее
От: "Arguile"
Дата:
Сообщение: Re: Explain Output made Colourful