Re: BUG #2768: dates before year 1600 in timestamptz column give strange results - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #2768: dates before year 1600 in timestamptz column give strange results
Date
Msg-id 26368.1164091569@sss.pgh.pa.us
Whole thread Raw
In response to BUG #2768: dates before year 1600 in timestamptz column give strange results  ("Mikko Tiihonen" <mikko.tiihonen@iki.fi>)
List pgsql-bugs
Mikko Tiihonen <mikko.tiihonen@iki.fi> writes:
> On Mon, 20 Nov 2006, Tom Lane wrote:
>> ... The weird offset from GMT is probably a function of your local
>> timezone, which you didn't mention.

> My database in configured to timezone Europe/Helsinki aka +0200.

The zic database says that Helsinki kept local mean solar time before
1921:

# 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

Of course, back in the 1600's they probably didn't keep time as
accurately as all that, but feel free to change your copy of that
configuration file if you want a different answer.  I'd be willing
to bet that around 1900, the 1:39 offset was indeed correct.

FWIW, pre-8.2 Postgres does have some issues with displaying
fractional-minute GMT offsets.  PG 8.1.5:

regression=# set timezone = 'Europe/Helsinki';
SET
regression=# select '1600-01-01'::timestamptz;
        timestamptz
---------------------------
 1600-01-01 00:00:00+01:39
(1 row)

CVS HEAD gets it right:

regression=# set timezone = 'Europe/Helsinki';
SET
regression=# select '1600-01-01'::timestamptz;
         timestamptz
------------------------------
 1600-01-01 00:00:00+01:39:52
(1 row)


            regards, tom lane

pgsql-bugs by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: BUG #2768: dates before year 1600 in timestamptz column give strange results
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #2764: Capital letter in tables or columns not