Re: BUG #2768: dates before year 1600 in timestamptz column give strange results
От | Tom Lane |
---|---|
Тема | Re: BUG #2768: dates before year 1600 in timestamptz column give strange results |
Дата | |
Msg-id | 26368.1164091569@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #2768: dates before year 1600 in timestamptz column give strange results ("Mikko Tiihonen" <mikko.tiihonen@iki.fi>) |
Список | 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 по дате отправления: