Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 265999FB5E4 for ; Mon, 16 Apr 2007 13:06:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 40046-02-4 for ; Mon, 16 Apr 2007 13:06:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 817979FB56C for ; Mon, 16 Apr 2007 13:06:50 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l3GG6hqm021628; Mon, 16 Apr 2007 12:06:43 -0400 (EDT) To: villeja@avoltus.com cc: pgsql-jdbc@postgresql.org Subject: Re: Bug in timezone-parsing? In-reply-to: <20070416141541.GA25077@mail> References: <20070416141541.GA25077@mail> Comments: In-reply-to villeja@avoltus.com message dated "Mon, 16 Apr 2007 17:15:41 +0300" Date: Mon, 16 Apr 2007 12:06:43 -0400 Message-ID: <21627.1176739603@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/49 X-Sequence-Number: 16898 villeja@avoltus.com writes: > I found a problem with the parsing of timezone-offsets in the current > PG-driver. It seems something weird happened between 1921 and 1922, as the > offset changes from hour-precision to second-precision: > postgres=> select '1921-01-01'::timestamptz, '1922-01-01'::timestamptz; > timestamptz | timestamptz > ------------------------------+------------------------ > 1921-01-01 00:00:00+01:39:52 | 1922-01-01 00:00:00+02 FWIW, that is expected behavior if you're using the Europe/Helsinki time zone data: # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Helsinki 1:39:52 - LMT 1878 May 31 1:39:52 - HMT 1921 May # Helsinki Mean Time 2:00 Finland EE%sT 1981 Mar 29 2:00 2:00 EU EE%sT Quite a lot of places were observing local mean time up to the early 1900s, so you'll see very strange GMT offsets for dates that far back. regards, tom lane