dbTalk Databases Forums  

Re: [BUGS] BUG #2768: dates before year 1600 in timestamptz column

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #2768: dates before year 1600 in timestamptz column in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mikko Tiihonen
 
Posts: n/a

Default Re: [BUGS] BUG #2768: dates before year 1600 in timestamptz column - 11-21-2006 , 01:34 PM







On Mon, 20 Nov 2006, Tom Lane wrote:

Quote:
"Mikko Tiihonen" <mikko.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. 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. I knew that
the floating point stamps are not fully accurate, but I showed the result with
that setting too, just to prove that the internal storing/handling format did
not matter in this bug.

Where can I find out what function is used for my timezone ? And even if there
would be different timezone calculation formulas for different timezones I do
not believe that the date of the timestamp should be a parameter that affects
the result.

Further notice that the insert statements included a fully qualified timestamp
including the timezone so that the database local timezone won't affect the
inserted value. On the other hand I do think that the values printed by select
can be affected by the database timezone.

I would very much like someone to try the small insert/select statements in my
bug report and to verify if the bug is in my setup or if it is a real bug.

My current quess is that when doing the math of converting from gregorian
calendar system to julian (or vise versa) postgresql forgets to clear the time
component from the timestamp before adjusting the date, resulting in the time
shifted with some strange constant.

-Mikko

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Mikko Tiihonen
 
Posts: n/a

Default Re: [BUGS] BUG #2768: dates before year 1600 in timestamptz column - 11-24-2006 , 03:08 PM








On Tue, 21 Nov 2006, Heikki Linnakangas wrote:

Quote:
Heikki Linnakangas wrote:
Tom Lane wrote:
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:

Confirmed that it's expected behavior. The timezone really was GMT+01:39:52
until May 1st, 1921. See

http://igs.kirjastot.fi/iGS/kysymyks...=Kes%C3%A4aika

and search for "1921" for details (in Finnish).

Ok. Thank you for clearing this up.

I'm sorry to have bothered you with the issue. I'll go back to wondering why
the java jdbc postgresql driver is 3x slower when it sees the odd timezone in
the response.

-Mikko

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.