Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uan5u-00009z-MM for pgsql-bugs@arkaria.postgresql.org; Fri, 10 May 2013 13:10:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uan5u-00037T-73 for pgsql-bugs@arkaria.postgresql.org; Fri, 10 May 2013 13:10:42 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uan5t-00037D-K9 for pgsql-bugs@postgresql.org; Fri, 10 May 2013 13:10:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uan5r-0006RZ-DX for pgsql-bugs@postgresql.org; Fri, 10 May 2013 13:10:41 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r4ADAcTl003415; Fri, 10 May 2013 09:10:38 -0400 (EDT) From: Tom Lane To: =?ISO-8859-1?Q?Karsten_D=FCsterloh?= cc: pgsql-bugs@postgresql.org Subject: Re: Strange time zone +00:53:28 In-reply-to: <518CB0FA.2080702@tal.de> References: <518CB0FA.2080702@tal.de> Comments: In-reply-to =?ISO-8859-1?Q?Karsten_D=FCsterloh?= message dated "Fri, 10 May 2013 10:34:02 +0200" Date: Fri, 10 May 2013 09:10:38 -0400 Message-ID: <3414.1368191438@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =?ISO-8859-1?Q?Karsten_D=FCsterloh?= writes: > Under Pg 8.3, we used the timestamp > 0001-01-01 00:00:00+01 > as an easy-to-remember marker for 'dunno, but predates any usual > business dates' for fields of type timestamp with time zone. Have you considered using '-infinity'? > With Pg 9.1, these timestamps now appear as > 0001-12-31 23:53:28+00:53:28 BC This is not a bug. I refer you to the IANA timezone database's entry for Europe/Berlin: # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Berlin 0:53:28 - LMT 1893 Apr 1:00 C-Eur CE%sT 1945 May 24 2:00 1:00 SovietZone CE%sT 1946 1:00 Germany CE%sT 1980 1:00 EU CE%sT which says that timekeeping before April 1893 was done according to local mean solar time, 53:28 east of Greenwich; so a timestamp specified as midnight GMT+1 comes out as 23:53:28 local time. Now, I agree that it's somewhat debatable to extend that rule clear back to 1 AD; but it's more sensible than believing that local time would ever have been taken as exactly GMT+1 before the days of standardized timezones. The only reason 8.3 and before didn't do what you're seeing is they were incapable of applying timezone rules outside the range of 32-bit time_t (ie, back to about 1901). We fixed that code to be 64-bit, and now it does what the timezone definition says. If you're inextricably wedded to using '0001-01-01 00:00:00+01', you might consider building yourself a custom timezone database that has an entry defined the way you want. But personally I'd recommend changing to something less randomly chosen. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs