Re: BUG #2768: dates before year 1600 in timestamptz column give strange results

From: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Mikko Tiihonen" <mikko(dot)tiihonen(at)iki(dot)fi>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #2768: dates before year 1600 in timestamptz column give strange results
Date: 2006-11-21 11:00:49
Message-ID: 4562DC61.30502@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> "Mikko Tiihonen" <mikko(dot)tiihonen(at)iki(dot)fi> writes:
>> PostgreSQL compiled with intdatetime=off
>> stamp
>> ----------------------------------
>> 0134-05-06 08:52:26.123459+01:39
>> 2134-05-06 09:12:34.123456+02
>> (2 rows)
>
> [ shrug... ] Floating-point timestamps are not perfectly accurate; the
> further away you go from 2000-01-01, the less so.

Agreed.

> The weird offset from GMT is probably a function of your local timezone, which you didn't
> mention.

Most likely "Europe/Helsinki". I can reproduce the problem with that:

postgres=# set time zone 'Europe/Helsinki';
SET
postgres=# SELECT * FROM tester;
stamp
-------------------------------------
0134-05-06 08:52:26.123459+01:39:52
2134-05-06 09:12:34.123456+02
(2 rows)

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2006-11-21 11:23:42 Re: BUG #2768: dates before year 1600 in timestamptz column give strange results
Previous Message Bill 2006-11-21 09:15:03 210 - SQL STATE = 28000