datestyle=postgres broken with timezone=UTC+N

From: Christoph Berg <cb(at)df7cb(dot)de>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: datestyle=postgres broken with timezone=UTC+N
Date: 2015-08-30 10:29:45
Message-ID: 20150830102944.GA6531@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Discovered when debugging libpqtypes test failures:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795729

postgres =# set timezone = 'Etc/UTC+1';
SET
postgres =# set datestyle = 'postgres';
SET
postgres =# select '2015-01-01 01:00:00 +0100'::timestamptz;
Wed 31 Dec 23:00:00 2014 ETC/UTC

postgres =# select 'Wed 31 Dec 23:00:00 2014 ETC/UTC'::timestamptz;
Wed 31 Dec 22:00:00 2014 ETC/UTC

That is, feeding back a value will to the UTC offset shift again.
(9.6 head, also seen on 9.4.)

Christoph
--
cb(at)df7cb(dot)de | http://www.df7cb.de/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message My Life 2015-08-30 10:58:22 Proposal of Table Partition
Previous Message Pavel Stehule 2015-08-30 08:34:48 Re: On-demand running query plans using auto_explain and signals