From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: nicola.oricchio@vertigis.com
Subject: BUG #18518: ::timestamp add minutes and seconds to the converted values
Date: Thu, 20 Jun 2024 15:33:29 +0000
Message-ID: <18518-e16f6cc69c9ce413@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 18518
Logged by: Nicola Oricchio
Email address: nicola.oricchio@vertigis.com
PostgreSQL version: 12.18
Operating system: Ubuntu
Description:
repro:
create table aaa (dat timestamp without time zone);
insert into aaa values ('1892-12-31 23:00:00');
insert into aaa values ('1893-12-31 23:00:00');
insert into aaa values ('1992-12-31 13:33:12');
select dat, (dat at time zone 'utc')::timestamp without time zone from aaa
order by 1;
output:
dat | timezone
---------------------+---------------------
1892-12-31 23:00:00 | 1893-12-31 23:53:28 <-- it should be 1893-01-01
00:00:00
1893-12-31 23:00:00 | 1894-01-01 00:00:00
1992-12-31 13:33:12 | 1992-12-31 14:33:12
it works correctly with 12.2
dat | timezone
---------------------+---------------------
1892-12-31 23:00:00 | 1893-01-01 00:00:00
1893-12-31 23:00:00 | 1894-01-01 00:00:00
1992-12-31 13:33:12 | 1992-12-31 14:33:12
time zone is CET
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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, nicola.oricchio@vertigis.com
Subject: Re: BUG #18518: ::timestamp add minutes and seconds to the converted values
In-Reply-To: <18518-e16f6cc69c9ce413@postgresql.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