pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Francisco Olarte <folarte@peoplecall.com>
Cc: dafoer_x@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour
Date: Fri, 14 Jan 2022 10:24:52 -0500
Message-ID: <3379884.1642173892@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+bJJbxLHKPOd7RUFckQ+X14+Ob+Swnqonc2m65garJRHsqdEw@mail.gmail.com>
References: <17366-8744a901d10fd9d1@postgresql.org>
	<CA+bJJbxLHKPOd7RUFckQ+X14+Ob+Swnqonc2m65garJRHsqdEw@mail.gmail.com>

Francisco Olarte <folarte@peoplecall.com> writes:
> On Fri, 14 Jan 2022 at 11:15, PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> postgres=# set timezone to "PST8PDT";
>> ..
>> postgres=# select (timestamp '2021-03-14 02:00:00')::timestamptz;
>> 2021-03-14 03:00:00-07
>> postgres=# select (timestamp '2021-03-14 03:00:00')::timestamptz;
>> 2021-03-14 03:00:00-07

> You are playing around the DST changes, and timestamp must have unique
> representations, for informal descriptions "time jumps from 2 to 3" is
> fine, when dealing with real data you must decide if it jumps just
> before or just after, it seems your expectations are wrong:

Yeah.  See

https://www.postgresql.org/docs/devel/datetime-invalid-input.html

(I'm pointing you to the devel version of that page because it
contains a correction that hasn't yet propagated into the other
versions)

			regards, tom lane





view thread (3+ messages)

Message-ID: <3379884.1642173892@sss.pgh.pa.us>
Permalink:  ../3379884.1642173892@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3379884.1642173892@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, folarte@peoplecall.com, dafoer_x@163.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17366: Error result returned in timestamp2timestamptz, expected to be off by one hour
  In-Reply-To: <3379884.1642173892@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox