From: | Michael Clark <codingninja(at)gmail(dot)com> |
---|---|
To: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problems with timestamp with time zone and old dates? |
Date: | 2012-08-22 03:09:31 |
Message-ID: | CACAT_AfvdFpbnuvB9=xDJKff8LEk_mS=LGZLFq9r3PX9BZgm=Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello.
Thanks for the response.
The value being returned from PG, with the odd offset is expected?
Thanks again,
Michael.
On Tue, Aug 21, 2012 at 5:50 PM, Steve Crawford <
scrawford(at)pinpointresearch(dot)com> wrote:
> On 08/21/2012 02:29 PM, Michael Clark wrote:
>
>> Hello all,
>>
>> I have a weird situation I am trying to work through, and could use some
>> help if anyone can provide some.
>>
>> I have a table with a column to store timestamp with time zone, and when
>> I store an older take (before 1895 or so), the value I get back from PG
>> when doing a select seems odd and is causing my client some issues with the
>> format string.
>>
>> For example, if I insert like so:
>> INSERT INTO sometable (startdate) values ('1750-08-21 21:17:00+00:00');
>>
>> I get the following when I select:
>> SELECT startdate FROM sometable;
>> startdate
>> ------------------------------
>> 1750-08-21 15:59:28-05:17:32
>> (1 row)
>>
>>
>> It's the odd offset that is causing my client problems, and I was
>> wondering if this is expected?
>> (I am using PG9.1.3)
>>
>> This contrasts:
>> INSERT INTO sometable (startdate) values ('2012-08-21 21:17:00+00:00');
>>
>> I get the following when I select:
>> startdate
>> ------------------------
>> 2012-08-21 17:17:00-04
>> (1 row)
>>
>>
>> Can anyone shed some light on if this is expected, or if I am doing
>> something odd?
>>
>> Much appreciated!
>> Michael
>>
>> PostgreSQL derives its timezone rules from the Olson database:
> http://en.wikipedia.org/wiki/**Tz_database<http://en.wikipedia.org/wiki/Tz_database>
> .
>
> N.B the offset prior to November 18, 1883.
>
> Cheers,
> Steve
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2012-08-22 03:24:38 | Re: Are there any options to parallelize queries? |
Previous Message | Ondrej Ivanič | 2012-08-21 22:51:57 | Re: redundant fields in table for "performance optimizations" |