Re: timestamp skew during 7.4 -> 8.2 upgrade

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: timestamp skew during 7.4 -> 8.2 upgrade
Date: 2007-08-09 15:49:38
Message-ID: dcc563d10708090849w11624c1bi7d4cac9312b56bed@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 8/9/07, Louis-David Mitterrand
<vindex+lists-pgsql-general(at)apartia(dot)org> wrote:
> Hi,
>
> After our 7.4 to 8.2 upgrade using debian tools, we realized that some
> of our timestamps with tz had shifted:
>
> For example '2007-04-01 00:00:00+02' became '2007-03-31 23:00:00+01'
> which is on a different month. Some of our applications were severely
> disturbed by that.
>
> Has anyone noticed that? Is there a way that would could have avoided
> it?

Since timestamptz is stored as a GMT time, and then an offset is
applied on retrieval, I'd guess that with 8.2 you're using up to date
timezone files, and with 7.4 they were out of date and therefore
returning the wrong time. I.e. they had the wrong offset for a given
date.

Not sure how you could avoid it off the top of my head, besides
keeping your 7.4 db tz data up to date.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-08-09 15:59:53 Re: [JDBC] Restore database from zipped textfile (.sql) created by pg_dumpall
Previous Message M S 2007-08-09 15:48:14 Re: failed to unlink, Permission denied