Re: Time Zone Query
От | Blake Crosby |
---|---|
Тема | Re: Time Zone Query |
Дата | |
Msg-id | 5.0.2.1.2.20010105140727.01a4a2a8@home.samurai.com обсуждение исходный текст |
Ответ на | Re: Time Zone Query (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
At 12:09 PM 4/01/2001 -0500, you wrote: >No, the times in the database are all GMT. They will get *displayed* >with some particular timezone offset, as determined by the TIMEZONE >SET variable. > >You have to set TIMEZONE to your local timezone if you want dates >displayed in something other than the server's default timezone. >Perhaps what you are really looking for is the PGTZ environment >variable. If you keep PGTZ set in your environment, libpq will issue >the SET TIMEZONE command for you during connection startup. > > regards, tom lane After further investigation it turns out I am looking for a timestamp and timetz hybrid. Possibly timestamptz ? :) My solution has been to store the timezone offset in a int4 field, then apply that offset when selecting data from my timestamp type fields. Regards, Blake Crosby
В списке pgsql-general по дате отправления: