Re: Problems with timestamp with time zone and old dates?

Поиск
Список
Период
Сортировка
От Michael Clark
Тема Re: Problems with timestamp with time zone and old dates?
Дата
Msg-id CACAT_AdQuRby5i+xBk=Ga2=FixrACL08Ww1eqRxZp2LeXip+XA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Problems with timestamp with time zone and old dates?  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
HI Scott.

Thanks a lot for the feedback.
I ended up setting the client time zone to GMT on my connections, and that has "fixed" the problem for us.
It's actually an awesome solution, we can now expect all timestamps to be returned in a consistent fashion.

Thanks for prodding me on that and sending me down that road!
Michael.


On Wed, Aug 22, 2012 at 12:19 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Tue, Aug 21, 2012 at 10:12 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Tue, Aug 21, 2012 at 10:08 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
>> On Tue, Aug 21, 2012 at 3:29 PM, Michael Clark <codingninja@gmail.com> wrote:
>>> For example, if I insert like so:
>>> INSERT INTO sometable (startdate) values ('1750-08-21 21:17:00+00:00');
>>
>> What's the reason for you inserting with an offest instead of letting
>> the client timezone set it for you?  Just wondering.
>
> Note that if you just want to get out what you're putting in (GMT) you
> can do this:
>
> select startdate at time zone 'GMT' from sometable ;
>       timezone
> ---------------------
>  1750-08-21 21:17:00

Or you could just use plain timezones, not timezones with timestamp.

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Some thoughts on table inheritance (which is uniquely awesome on PostgreSQL)
Следующее
От: Michael Clark
Дата:
Сообщение: Re: Problems with timestamp with time zone and old dates?