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

From: Michael Clark <codingninja(at)gmail(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problems with timestamp with time zone and old dates?
Date: 2012-08-23 19:41:18
Message-ID: CACAT_AdQuRby5i+xBk=Ga2=FixrACL08Ww1eqRxZp2LeXip+XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)marlowe(at)gmail(dot)com>wrote:

> On Tue, Aug 21, 2012 at 10:12 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> wrote:
> > On Tue, Aug 21, 2012 at 10:08 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> wrote:
> >> On Tue, Aug 21, 2012 at 3:29 PM, Michael Clark <codingninja(at)gmail(dot)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.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Clark 2012-08-23 19:42:09 Re: Problems with timestamp with time zone and old dates?
Previous Message Merlin Moncure 2012-08-23 19:36:58 Re: Some thoughts on table inheritance (which is uniquely awesome on PostgreSQL)