Re: recovery dump on database with different timezone

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Edmundo Robles <edmundo(at)sw-argos(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: recovery dump on database with different timezone
Date: 2017-01-24 01:23:44
Message-ID: 1e4fdae3-27f9-ee0d-0207-f22eb8ad254b@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 01/23/2017 05:14 PM, David G. Johnston wrote:
> On Mon, Jan 23, 2017 at 6:08 PM, Adrian Klaver
> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>wrote:
>
>
> production=# show timezone;
> TimeZone
> ----------
> UTC
> (1 row)
>
> production=# select ' 2011-01-01 00:00:03.925-06'::timestamptz <
> '2011-01-01'::date;
> ?column?
> ----------
> f
>
>
> ​What Tom said - though I missed the part about "the timezone when the
> data was entered" - I was thinking it was only ​the timezone at the time
> of the dump that would impact things.
>
> To your example - testing in UTC is going to always result in failure
> for Z values <= 0 since they will all result in a UTC date of
> 2011-01-01. Choosing +06 would result in a passed test.

That was sort of the point, I was just using the value that the OP said
worked:

"if change 2011-01-01 00:00:03.925+00 to 2011-01-01 00:00:03.925-06
works ok"

I could not see how it did.

>
> David J.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-01-24 01:48:56 Re: recovery dump on database with different timezone
Previous Message David G. Johnston 2017-01-24 01:14:02 Re: recovery dump on database with different timezone