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

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Michael Clark <codingninja(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-22 04:12:43
Message-ID: CAOR=d=1t2H_2-XLX0oZnWaA4HpfFdhp2kFjJtv0x0Kr1hnBuNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wells Oliver 2012-08-22 04:16:37
Previous Message Scott Marlowe 2012-08-22 04:08:22 Re: Problems with timestamp with time zone and old dates?