From: Erik Wienhold <ewie@ewie.name>
To: Steve Rogerson <steve.git@woodsideendurance.co.uk>
To: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Possible old and fixed bug in Postgres?
Date: Wed, 5 Apr 2023 12:23:18 +0200 (CEST)
Message-ID: <2134938884.639895.1680690198796@office.mailbox.org> (raw)
In-Reply-To: <f8a40a55-0cfe-9c48-1f34-c157f34b5f46@woodsideendurance.co.uk>
References: <f8a40a55-0cfe-9c48-1f34-c157f34b5f46@woodsideendurance.co.uk>
> On 05/04/2023 11:18 CEST Steve Rogerson <steve.git@woodsideendurance.co.uk> wrote:
>
> I was looking at perl CPAN Module (DateTime::Format::Pg) and saw that it did
> something that seemed odd to me with time zones, based on the comment:
>
> # For very early and late dates, PostgreSQL always returns times in
> # UTC and does not tell us that it did so.
>
> Early is before 1901-12-14 and late after 2038-01-18
>
> A quick test setting my time zone to be America/Chicago I got
>
> select '1900-01-01 00:00:00'::timestamptz;
> timestamptz
> ------------------------
> 1900-01-01 00:00:00-06
> (1 row)
>
> and
>
> select '2040-01-01 00:00:00'::timestamptz;
> timestamptz
> ------------------------
> 2040-01-01 00:00:00-06
>
>
> These seemed correct to me. I'm guessing this might have been a bug/feature of
> pg in the long ago.
Judging by the commit message and changed test cases, probably:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=921d749bd4c34c3349f1c254d5faa2f1cec03...
--
Erik
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ewie@ewie.name, steve.git@woodsideendurance.co.uk
Subject: Re: Possible old and fixed bug in Postgres?
In-Reply-To: <2134938884.639895.1680690198796@office.mailbox.org>
References: <f8a40a55-0cfe-9c48-1f34-c157f34b5f46@woodsideendurance.co.uk> <2134938884.639895.1680690198796@office.mailbox.org>
* 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