BUG #18518: ::timestamp add minutes and seconds to the converted values - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18518: ::timestamp add minutes and seconds to the converted values
Date
Msg-id 18518-e16f6cc69c9ce413@postgresql.org
Whole thread Raw
Responses Re: BUG #18518: ::timestamp add minutes and seconds to the converted values
Re: BUG #18518: ::timestamp add minutes and seconds to the converted values
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: Mujjamil k
Date:
Subject: Re: BUG #18516: Foreign key data integrity is not validated when reenabled the trigger on tables
Next
From: Melanie Plageman
Date:
Subject: Re: relfrozenxid may disagree with row XIDs after 1ccc1e05ae